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

Add support for the use of regfiles in swregs #719

Open
AndreMerendeira opened this issue Jan 17, 2024 · 1 comment
Open

Add support for the use of regfiles in swregs #719

AndreMerendeira opened this issue Jan 17, 2024 · 1 comment
Assignees

Comments

@AndreMerendeira
Copy link
Contributor

No description provided.

@AndreMerendeira AndreMerendeira changed the title Add syupport for the use of regfiles in swregs Add support for the use of regfiles in swregs Jan 17, 2024
@jjts
Copy link
Contributor

jjts commented Aug 5, 2024

Currently the hardware is not generated if log2items != 0 (register array in successive addresses)

From the inside of the core, these register files can be read in two ways :

  1. all regs in parallel

  2. there is an address signal exposed to logic inside

@jjts jjts assigned arturum1 and unassigned agrevin Sep 10, 2024
arturum1 added a commit to arturum1/py2hwsw that referenced this issue Sep 12, 2024
If user sets a write register with 'log2n_items' > 0, then csrs.py will
generate the regfile inside the csrs module.
All registers from regfile can be read in parallel. A port signal is created for each register in the regfile.
Example, if we create a CSR, named 'reg', with 'log2n_items' = 2, then the following
port signals will be available in the csrs module:
reg_0_wr
reg_1_wr
reg_2_wr
reg_3_wr

If the user creates a CSR with `autoreg = False`, then the regfile is not generated.
The csrs module continues to generate a single port for this
regfile, since the signals come from the CPU, and the CPU can only
address one register at a time.

If the user creates a CSR of type "R" (read register), then the regfile is not
generated. This is because read registers should always be implemented by
user logic. The csrs module only generates wires to read from the user
logic's regfile.

Note 1: If we have `autoreg = True`, and type "RW", then the csrs module will
generate the regfile for the write part, but will continue to have
normal wires for the read part.

Note 2: The user logic can find out which register from the regfile is being addressed
by using the `iob` output port of the csrs module. (The `iob` output port is
always available to user logic, even if csr_if is set to another interface).

Related to issues:
IObundle#33
IObundle/iob-soc#719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants