Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20704 Discussions

Topic: how shift in(16 bit) and shift out(1 bit at a time)

Altera_Forum
Honored Contributor II
989 Views

Topic: how shift in(16 bit) and shift out(1 bit at a time) 

Example:shiftin[15..0] and shiftout[0]  

 

How to edit the RAM- based shift register(Altshift_taps) megafunction to meet my requirement 

Currently I am using the RAM- based shift register(Altshift_taps) megafunction, on block diagram
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
276 Views

wouldn't it be easier to just write something in verilog rather than using a megafunction? i.e. 

 

reg [15:0] bits; 

 

assign shift_out = bits[15]; 

 

always @ ( posedge clk ) 

if ( load ) 

bits <= data; 

else if ( enable ) 

bits <= { bits[14:0], 1'b0 }; // or bits <= bits << 1, whichever you prefer. 

 

-Mux
0 Kudos
Reply