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

Typical litedram-L2 port sizes #312

Open
bala122 opened this issue Oct 29, 2022 · 0 comments
Open

Typical litedram-L2 port sizes #312

bala122 opened this issue Oct 29, 2022 · 0 comments

Comments

@bala122
Copy link

bala122 commented Oct 29, 2022

Hi, @mithro and anyone else,
I just wanted to know what the typical litedram port sizes are ( in bits I presume) since I need to figure out the L2 size synthesized by litex implemented for the arty A7 100t board.
Normally, the shared L2 size is given by:

            # Request a LiteDRAM native port. 
             port = sdram.crossbar.get_port() 
             port.data_width = 2**int(log2(port.data_width)) # Round to nearest power of 2. 
  
             # Create Wishbone Slave. 
             wb_sdram = wishbone.Interface() 
             self.bus.add_slave("main_ram", wb_sdram) 
  
             # L2 Cache 
             if l2_cache_size != 0: 
                 # Insert L2 cache inbetween Wishbone bus and LiteDRAM 
                 l2_cache_size = max(l2_cache_size, int(2*port.data_width/8)) # Use minimal size if lower

So, if I give an L2 size of say 64 or 256 bytes, will it be the same as the input or is the determined by the port width
Please let me know about this soon
Thanks,
Bala.

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

1 participant