4 Star 0 Fork 0

王赛宇 / nscscc2020_final

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hilo_reg.v 834 Bytes
一键复制 编辑 原始数据 按行查看 历史
王赛宇 提交于 2020-08-08 20:42 . 初始代码,有错
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 2018/07/31 15:21:31
// Design Name:
// Module Name: hilo_reg
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module hilo_reg(
input wire clk,rst,
input wire[1:0] we,
input wire[31:0] hi,lo,
output wire [31:0]hi_o,lo_o
);
reg [31:0] hi_reg,lo_reg;
always @(negedge clk) begin
if(rst) begin
hi_reg <= 0;
lo_reg <= 0;
end else begin
if(we[1]) hi_reg <= hi;
if(we[0]) lo_reg <= lo;
end
end
assign hi_o = hi_reg;
assign lo_o = lo_reg;
endmodule
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Verilog
1
https://gitee.com/saiyuwang/nscscc2020_final.git
git@gitee.com:saiyuwang/nscscc2020_final.git
saiyuwang
nscscc2020_final
nscscc2020_final
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891