Altera_Forum
Honored Contributor
20 years agoAddress alignment
1.
There are IORD,IOWR routines. It is right to IORD_32DIRECT("*000 *004 *008 *00C")! Then is it right to IORD_32DIRECT("*001 *005 *009 *00C...") or IORD_8DIRECT("*001 *002 *003 *004...") when accesses the tristate slaves?? And while accesses the "normal" slave, such as registers in UART, which address should we keep in mind in IORD/IOWR? Master or slave address? (reference: I look up quartusii_handbook(may 2005) p1302 (http://www.altera.com/literature/hb/qts/quartusii_handbook.pdf) andavalon interface specification(april 2005) p67 p88 (http://www.altera.com/literature/manual/mnl_avalon_spec.pdf) about "Address alignment". As NiosII is 32-bit CPU, so the master address is always "*000 *004 *008 *00C" . However the "the tristate slave" is always byte-address("*000 *001 *002 *003...") In another words, when there are some registers in a tristate slave comopent(8 bit ), what's address in IORD/IOWR? IS it *001 *002 *003 *004... or *000 *004 *008 *00C? Maybe it is a common sense , but it is confuse me. --------------------------------------------------------------- 2. By the way, when SDRAM shares the tristate bus, the addresses(A11-A0) of SDRAM(32-bit data width) should connect to (A13-A2) of the tristate bus?