Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHey guys,
So I've got some updates as I've finally gotten my IP component working and the Eclipse SBTs have been building my system.h file with IRQ and IRQ_CONTROLLER numbers that match my Qsys design. If you look at my above post you can see my IRQ line is even with my clock input for my I2C component which is wrong (pointed out by BadOmen). I think this was due (as mentioned by two guys on the first page of this thread) to my
set_interface_property s1_irq associatedAddressablePoint ""
being blank. I added my addressable point:
set_interface_property s1_irq associatedAddressablePoint "s1_irq"
which I got from the last line here, line add_interface_port etc...
add_interface s1_irq interrupt end
set_interface_property s1_irq associatedAddressablePoint "s1"
set_interface_property s1_irq associatedClock clock
set_interface_property s1_irq associatedReset reset
set_interface_property s1_irq ENABLED true
set_interface_property s1_irq EXPORT_OF ""
set_interface_property s1_irq PORT_NAME_MAP ""
set_interface_property s1_irq CMSIS_SVD_VARIABLES ""
set_interface_property s1_irq SVD_ADDRESS_GROUP ""
add_interface_port s1_irq avs_s0_irq irq Output 1
Once I changed this you can see my IRQ line is now moved down to my Avalon MM interface. IRQ3 http://www.alteraforum.com/forum/attachment.php?attachmentid=9531&stc=1 After I synthesized this and rebuilt the HAL bsp my interrupt numbers came up:
/*
* I2C_Master_RXTX configuration
*
*/
# define ALT_MODULE_CLASS_I2C_Master_RXTX I2C_Master_RXTX# define I2C_MASTER_RXTX_BASE 0x0# define I2C_MASTER_RXTX_IRQ 3# define I2C_MASTER_RXTX_IRQ_INTERRUPT_CONTROLLER_ID 0# define I2C_MASTER_RXTX_NAME "/dev/I2C_Master_RXTX"# define I2C_MASTER_RXTX_SPAN 16# define I2C_MASTER_RXTX_TYPE "I2C_Master_RXTX"
I think this problem shows up in Qsys when you create your IP component. Check the Associated addressable interface out under your IRQ sender interface when building the component. I think you want this: http://www.alteraforum.com/forum/attachment.php?attachmentid=9532&stc=1 The problem I had is that the drop down never had my interface. It only had none. So I guess setting the addressable point in the .tcl file as recommended by the guys earlier in this posts fixes this. Hope this is helpful! Rob