Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rtl] rework SoC bus system #607

Merged
merged 6 commits into from
May 1, 2023
Merged

[rtl] rework SoC bus system #607

merged 6 commits into from
May 1, 2023

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Apr 30, 2023

This PR is a complete make-over of the processor's internal bus system. Now, all IO modules and memories use a unified bus interface based on two custom types (I love VHDL 😄):

  -- Internal Bus Interface: Request --------------------------------------------------------
  -- -------------------------------------------------------------------------------------------
  type bus_req_t is record
    addr : std_ulogic_vector(31 downto 0); -- access address
    data : std_ulogic_vector(31 downto 0); -- write data
    ben  : std_ulogic_vector(03 downto 0); -- byte enable
    we   : std_ulogic; -- write request (single-shot)
    re   : std_ulogic; -- read request (single-shot)
    src  : std_ulogic; -- access source (1=instruction fetch, 0=data access)
    priv : std_ulogic; -- set if privileged (machine-mode) access
  end record;

  -- Internal Bus Interface: Response -------------------------------------------------------
  -- -------------------------------------------------------------------------------------------
  type bus_rsp_t is record
    data : std_ulogic_vector(31 downto 0); -- read data
    ack  : std_ulogic; -- access acknowledge (single-shot)
    err  : std_ulogic; -- access error (single-shot)
  end record;

This (hopefully) makes the code a little bit clearer and also reduces manual wiring effort 😉

This is what the (new) bus interface signals look like (same protocol as always):

cpu_interface_read_long

@stnolting stnolting added HW hardware-related coding-style Related to the HW/SW coding style labels Apr 30, 2023
@stnolting stnolting self-assigned this Apr 30, 2023
@stnolting stnolting marked this pull request as ready for review April 30, 2023 18:18
@stnolting stnolting merged commit 03af5fc into main May 1, 2023
@stnolting stnolting deleted the soc_bus branch May 1, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding-style Related to the HW/SW coding style HW hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant