Forum Discussion
43 Replies
- Altera_Forum
Honored Contributor
Hello,
I don't understand what you mean with pinout in this respect. The operation of the old Altera SDRAM controller reference design is described rather detailed in the included white paper sdr_sdram.pdf. It can be easily operated for moderate speed requirements, e. g. 100 MHz at Cyclone or Cyclone II. As additonal remark, it may be necessary to define fast IO register for datapath and control signals explicitely in pin planner or assignment editor. Regards, Frank - Altera_Forum
Honored Contributor
Okay, thanks for your attach file.Have you got source code which uses verilog, not vhdl?Thanks again.
- Altera_Forum
Honored Contributor
Hello,
here you have the Altera SDRAM controller used with SOPC builder, it's parametrized for a 128 MBit chip with 32 Bit data width. As already mentioned, it has an additional FIFO to match the Avalon interface used with Nios II. Respective documentation had been posted by Daniel previously. Regards, Frank - Altera_Forum
Honored Contributor
CH...
If you need something more graphical in nature to help you to understand the state machine switches you could go ahead and compile the design without connecting your top level SOPC Builder project i/o pins, and then use the Quartus graphical state machine viewer to study the behavior. I am not sure what you hope to gain other than knowledge for knowledge sake. I don't know your level of knowledge, so forgive me if I insult you; but generally speaking, the state machines handle init cycles, precharge, and refresh commands, as well as placing the needed cs_n, ras_n, cas_n, & wr_n on the bus. This information is used in connection with the row, bank and column addresses to locate the storage position in sdram. There are many documents on this suject including the datsheet of the chip you are using that will provide you with their specific timimg requirements for parameterization of your controller module. Also, if you plan to use the pll to generate your external clock, I would suggest you start with a phase delay of -4ns for a custom board and work from there...agian all in the manual. By the way, what is you preferred design flow? Are you aware that you can create a schematic, and use generated symbols to make your design visually? I have found that method beneficial at times over the homogenous verilog/VHDL approach. --Daniel - Altera_Forum
Honored Contributor
Have you got the software which is translate VHDL to Verilog?
- Altera_Forum
Honored Contributor
Hello,
Sorry to hijack this thread, but this seems like a good thread too. I'm building a frame grabber using FPGA I have decided to use c3088 camera which uses ov6620 from Omnivision on my project. I would like to grab 2 frames into the FPGA. The camera has VSYNC, HREF, PCLK AND 8 bit for each pixel data. VSYNC tells us the start of a new frame, HREF tells us the start of new line while PCLK tells us a new pixel coming in. The camera provides 352x292 pixel but I'm only interested in the 1st 50x50 of the frame in the upper left corner. I would like to save the array of data into the SDR SDRAM. I've read some other project which is somewhat similar to mine. The fella build a component to receive the data from the camera in vhd and then add that component into sopc builder. I've also build component that would able to extract the first 50x50 pixels. and this is where i couldn't go further. The problem that im facing is how do i actually save this array of data into the SDRAM? I didnt saw any megacore ip for this SDRAM but i do found that there's a sdram controller in sopc builder. As, I'm quite new to this. I would like to know what is avalon in sopc builder, and what actually sopc builder do? I followed the instructions for building a nios system. but how does this system actually helps me in saving the array of data in SDRAM? What i know is that we can run C program in a nios ii system. but i do not need to run a c program for this system. - Altera_Forum
Honored Contributor
When i compile my code, i meets some error like that, can you help me?
. . .
. . .reg regSysDX;
Warning: truncated value with size 16 to match size of targer . . . reg syncResetClkCNT; . . .regSysDX <=# tDLY 16'h0000;
Warning: truncated value with size 16 to match size of targersyncResetClkCNT <=# tDLY (`endOf_Write_Burst) ? 1 : 0;
Warning: truncated value with size 16 to match size of targer etc...syncResetClkCNT <=# tDLY (clkCNT == NUM_CLK_READ) ? 1 : 0; - Altera_Forum
Honored Contributor
--- Quote Start --- syncResetClkCNT <=# tDLY (clkCNT == NUM_CLK_READ) ? 1 : 0;Warning: truncated value with size 16 to match size of targer --- Quote End --- I would expect a warning value with size 32 in this case, cause integer values have 32 rather than 16 as default size. If you examine Verilog code examples thorougly, you should notice that the bit width field of sized constants usually matches the target size.
would be a matching assignment. Generally, the compiler also accepts unsized constants as in your second example, but you will get a warning then, if it isn't disabled. By the way, the# tDLY is ignored in synthesis, it's functional in ModelSim only,regSysDX <=# tDLY 4'h0; - Altera_Forum
Honored Contributor
how can i fix it? please give me a solution
- Altera_Forum
Honored Contributor
What co you mean? I suggested to use sized constants of correct size and gave an example.
For general questions regarding verilog syntax, I suggest to consult a Verilog manual or textbook.http://www.stanford.edu/class/ee108b/labs/verilog_reference.pdf