Forum Discussion
Altera_Forum
Honored Contributor
15 years agoCustom Component Address Mapping
I have a custom component with a 8 bit ADDRESS bus. it is mapped in my hdl code this way : .... if (read & (address==8'h01)) readdata<=2; .... In my SOPC builder system i...
Altera_Forum
Honored Contributor
15 years agoIs your data bus 8 bits wide too?
you must be careful in that case, because the CPU always does a 32 bits access, which will be converted to 4 8 bits accesses. The second parameter in IORD is a register number in a 32-bit registers space, which means that if your data bus is 8 bits wide, a IORD(base_address,0) will read addresses 0,1,2,3 and IORD(base_address,1) will read addresses 4,5,6,7. It is usually better to make components with 32-bit data buses, it can avoid some trouble.