Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThanks for the time invested in explaining all this to me. I understand overall what you have explained but this has also created new queries because I could not succeed in implementing your suggestions. So to start, let's break it down again:
--- Quote Start --- Yes, you can have 2 32-bit PIOs. --- Quote End --- OK, I managed to do that based on another forum post . --- Quote Start --- Before getting into this, you should ask the question "do you NEED to?" --- Quote End --- Yes, I need to make it work on FPGA using its parallelism resources. I understand your reasons for not using it this way, but my task is more educational than real-world. I am just stepping into FPGA world and this is my way to learn. --- Quote Start --- But to utilize the FPGA resources and gain serious speedup, you would add a wrapper module that replicates the Sobel module. The Nios in this case would probably be doing some DMA transfer or providing the Avalon-MM address to a memory location --- Quote End --- My other attempt was to discard the PIOs and instead create an SOPC component with Avalon-MM. But I don't know how to create a wrapper module to instantiate more Sobel submodules. I've downloaded the Avalon Memory-Mapped Slave Template from Altera website, inserted as a component in SOPC and renamed as my_slave_component. However, I don't know what to put as the Register File properties (Word Size and Synchronization) and capabilities (I have enabled only two registers - one input and one output. Is that good?). When I looked at the my_slave_component.v to modify it and add my custom logic to it, I saw many new input/output ports.
input wire clk, // clock_reset.clk
input wire reset, // clock_reset_reset.reset
input wire slave_address, // s0.address
input wire slave_read, // .read
input wire slave_write, // .write
output wire slave_readdata, // .readdata
input wire slave_writedata, // .writedata
input wire slave_byteenable, // .byteenable
output wire user_dataout_0, // user_interface.export
input wire user_datain_1
Do I need to assign values to these ports or should I worry about my user_dataout_0 and user_datain_1 only? And where exactly within the my_slave_component.v code do I paste my code? There is a section called slave_template within the code. Do I put it before or after slave_template, or does it not matter? Do I also need a DMA Controller component? If yes, here again I have problems with the parameters :( --- Quote Start --- Storing data is a problem in and of itself. Why not just copy/paste from the console after your image is complete? Does it need to operate untethered from your PC? --- Quote End --- No, it can be tethered to the PC for now. I will sound even more stupid now but I can't copy-paste the results! I can highlight it all, but copy or Ctrl-c would not work. Do I have to enable something in Eclipse before? I am using Quartus 10.1 with NIOS SBT. --- Quote Start --- Better yet, what eval board are you using? --- Quote End --- I am using DE2-115 which has SD-card interface. I will try to read and store data to this when I get the current problems out of the way and after I complete the applying of multiple Sobels to a small 2-D array. Thank you for any advice about my new queries. It's quite tough to learn this technology on my own as I am doing.