发布网友 发布时间:2022-04-20 22:21
共2个回答
热心网友 时间:2023-06-16 09:04
灞曞紑鍏ㄩ儴mole fifo(clr,clk,din,LorR,dout)
input clr,clk,din;
input LorR;
output [7:0]dout;
reg [7:0] fifo;
assign dout=fifo;
always@( posedge clk)
if(clr)
fifo<=0;
else
if(LorR)
fifo<={fifo[6:0],din};
else
fifo<={din,fifo[7:1]};
endmole
if
热心网友 时间:2023-06-16 09:05
灞曞紑鍏ㄩ儴mole
fifo(clr,clk,din,LorR,dout)
input
clr,clk,din;
input
LorR;
output
[7:0]dout;
reg
[7:0]
fifo;
assign
dout=fifo;
always@(
posedge
clk)
if(clr)
fifo<=0;
else
if(LorR)
fifo<={fifo[6:0],din};
else
fifo<={din,fifo[7:1]};
endmole
if