04-03-2008 01:13 PM
I'm new to Altera and I need to create a component with avalon memory mapped slave interface.I really would like to see an example in VHDL code. I only can find examples in verilog code. Thanks
04-09-2008 11:05 AM
Do you know a little bit about SOPC Builder?You could start a clean Quartus II project, open the SOPC Builder, Create New System by choosing VHDL as Target HDL. Then add: 1) a Nios proc (just default) for having an avalon master (otherwise there will be an error message) 2) an Onchip Ram (System Contents -> Altera SOPC Builder -> Avalon Components -> Memory-> On-Chip Memory) with e.g. 1kBytes (default for exception and reset address, otherwise there will be an error message) 3) an Interval Timer (System Contents -> Altera SOPC Builder -> Avalon Components -> Others -> Interval Timer). Then go to the tap 'System Generation' and click 'Generate'. After generating that SOPC Builder project you will find a timer_0.vhd in you Quartus II project folder. This is quite simple VHDL code with an Avalon Slave Interface. You can try out some parameter settings of the Interval Timer and compare the results in the VHDL file. Keep in mind, that it's really just an example, depending on your needs, the avalon memory mapped slave interface signals can differ. For example, maybe you will never need an interrupt signal. For further information refer to the manual for the avalon memory mapped interface.
04-12-2008 03:02 PM
Thanks Herbert,That helped! I mannaged to create components with all the interfaces I need. I worked earlier with Xilinx tools. But these Altera tools are very good!