Altera_Forum
Honored Contributor
20 years agoSOPC create 8bit ext tristate memory
Maybe a simple question but i haven't found the correct documentation how it is ment to be done with ths sopc builder.
Our Target has a couple of external 8bit devices. Each delivers an IRQ_n. Now Nios is 32bit and a bus access, even a 8bit transfer could lead to 4 8bit transfers what is not what we want. so we use IORD_8DIRECT as the external devices have their own memory so the cache must not be used here. My Question is the following : I would like to replace the VHDL file we have that handles the datatransfer as is assumes an avalonconnection of 32bit and an external connection of 8bit. it is also fixed about amount of interrupt inputs and other stuff. My first idea was to add a avalon tristate bridge and for each external 8bit device a custom sopc device. At the end this should lead to SOPC schematic symbol where we have shared adress[19..0] and data[7..0] signal. it would be great if it could also lead to shared nRead and nWrite signals too but for each external device a seperate nchipselect and nirq. The avalon tristate bridge is just a simple add ... fine. Then i startet to build a new component with the sopc builder and this shares address and data but not read and write. This device is just a avalon_tristate_slave that is not base on a hdl. it's slave adressing is memory (i don't want the gap's) and the timing is set to that what the ext devices need. Now does a 32-bit access lead to 4x 8-bit access ? Does a single 8-bit access lead to only 1 8-bit access ? or does nios always access 32-Bit ? My problem is that some external devices are not 32-bit devices and a 8-bit access to such a device must not be an access to any other memory location of that device as adressed. imagine 8-data followed by 8-status bits and you try to read the data but nios reads the status too and troughs the value away but for the device the status has been accessed and it could be that the device drop's a bit (maybe int) as this bit has been read (what was not the intension of that access) Does such a avalon_tristate_slave handle the 8-bit 32-bit access ? does it check for the byteenables ? and shift the adressbits ? Is the timing that is entered realy the timing (with waitstates) ?