- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to define a Large SR and want it to be implemented with memory and not Logical elements (otherwise it will not fit the device) what should I add to my verilog code and what settings in the Quartus should I change in order to do that? all my atteps so far had failed :confused: +++++++ +++++++++++++++++++++++++++++++++++++++++++++ (* ramstyle = "M4K" *) reg [15:0] InLine[2677:0]; //################ InData to Shift Reg# ######################### always@(negedge Rx_clk_A) // Shift Reg for the incoming data begin // S.R. starts only when "write_port_A" is high if ( write_port_A ) // i.e. valid recording condition for HDR + Image begin for (I=0 ; I<2677 ; I=I+1) begin InLine[I+1] <= InLine[I]; InLine[0] <= l[15:0]; //InLine[0] <= Danny_LinkA_Data; end end endLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could start by using ALTSHIFT_TAPS megafunction.
(http://www.altera.com/literature/ug/ug_alt_shift_taps.pdf)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks I will try that also.
but is this the write syntex to tell the quartus to implement this with a memory block? (* ramstyle = "M4K" *) reg [15:0] InLine[2677:0]; to achive that is there any settings I should change inthe quartus? Urilis- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In order to implement a simple shift-register, you should make an structured description of hardware. First, describe your RAM Block as a single module.
Shift Register can be implemented as a Circular Buffer with a FIFO behaviour, where input data are writen in head address and output data is read from tail addresss. Read and write address generators can be implemented with mod-N counters, each one pre-loaded with 0 and N-1 respectively, N is the shift-register size.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the Quartus software manual, a shiftregister in RAM (an ALTSHIFT_TAPS megafunction) can be inferred from a behavioural description. With default settings, no additional synthesis attribute is required for a sufficient large shift register.
As you reported, this method seems not to work with your code, but I don't know why. You may try to reproduce the suggested example more exactly. The Quartus manual mentions several conditions for succesful SR inference: --- Quote Start --- To be detected, all the shift registers must have the following characteristics: ■ Use the same clock and clock enable ■ Do not have any other secondary signals ■ Have equally spaced taps that are at least three registers apart --- Quote End --- I tried with the Verilog template for one-bit wide, n-bit long shift register. It's always implemented in RAM, unless I disabled SR recognitaion for the module.(* altera_attribute = "-name AUTO_SHIFT_REGISTER_RECOGNITION OFF" *)

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page