litex-hub / litehyperbus

Small footprint and configurable HyperBus core
BSD 2-Clause "Simplified" License
10 stars 5 forks source link

core/hyperram_ddrx2: Optionally set config registers at reset #10

Closed zeldin closed 2 years ago

zeldin commented 2 years ago

This allows the configureation register(s) to be set on startup, in order to e.g. select the desired latency. If no CR values are provided, no additional logic is added compared to before.

enjoy-digital commented 2 years ago

Thanks @zeldin, this looks good to me. @gregdavill: Can you also have a look?

gregdavill commented 2 years ago

It looks good to me, having a way to read/set config values is a nice feature.

zeldin commented 2 years ago

Just to be clear, the new code does not provide any way to read register space. However, reading registers follow the exact same procedure as reading the memory array; only register writes are different. So if a generic register space read/write function were to be added, it would have to follow the new FSM path for writes but the old one for reads.