Forum Discussion
Altera_Forum
Honored Contributor
21 years agoThanks for your reply,
I'm a little bit confused, what is wrong. First the part of the ptf file for this component is equal to that of Quartus 4.1 (only one additional line " Clock_Source = "clk"; " looking at io.h .. /* Native bus access functions */ # define __IO_CALC_ADDRESS_NATIVE(BASE, REGNUM) ((void *)(((alt_u8*)BASE) + ((REGNUM) * (SYSTEM_BUS_WIDTH/8)))) # define IORD(BASE, REGNUM) __builtin_ldwio (__IO_CALC_ADDRESS_NATIVE ((BASE), (REGNUM)))# define IOWR(BASE, REGNUM, DATA) __builtin_stwio (__IO_CALC_ADDRESS_NATIVE ((BASE), (REGNUM)), (DATA)) .. by using IORD(..) __IO_CALC_ADDRESS_NATIVE already makes a multiplication of register * 4 the base adress of my component is 0x903000 IORD(baseadd,0x01) results in __builtin_ldwio(0x903004) which should read Register 1 of my slave the first time I get A0=1 of my slave (A2 of CPU) is by reading IORD(baseadd,0x10) results in __builtin_ldwio(0x903040) but the addtress bus of the cpu is 0x????04 Multiplication of all offsets by 4, before calling IORD is a workaround, but no slolution. is the above ptf file correct for this component ? is this a bug in SOPC Buider 4.2 ? Quartus 4.2 ? NIOS 1.1 ? is it only a project conversion problem from 4.1 to 4.2 ? (I regenerated the system in SOPC Builder 4.2 and recompiled with Quartus 4.2)