if(flag==4'h8) begin flag<=4'h0; control_out<=1'b0; end
else flag<=flag+1'b1; end else begin
state_bing_in<=bing_in; control_out<=1'b0; end end endmodule
/////串并转换
module chuanbing_in(clock,reset_n,chuan_in,bing_out,control_in); input clock,reset_n,chuan_in,control_in; output[7:0] bing_out;
reg [7:0] bing_out;
always @ (negedge clock or negedge reset_n) begin if(!reset_n) begin bing_out<=8'hxx; end
else if(control_in==1'b1) begin
bing_out<={bing_out[6:0],chuan_in}; end
else bing_out<=8'hxx; end endmodule
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库FPGA复习题(5)在线全文阅读。
相关推荐: