addr_mux.v

来自「一个验证过的CAM源码(CAM=Content Address Memory)。」· Verilog 代码 · 共 50 行

V
50
字号
////////////////////////////////////////////////////////////////////////////      Block Name      : addr_mux.v//      Author          : Jason Kassoff//      Date            : 01/28/01//      Last Revision   : 01/28/01 (by Jason Kassoff)////      Block Description ://          This block models the multiplexor that selects between//          the RAM address from the priority block and the address//          from the bus//// Controls: amx_sel_s2// Inputs: amx_pri_addr_v2, amx_cam_addr_s2// Outputs: amx_addr_out_v2////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////`include "definitions.v"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////module addr_mux ( amx_sel_s2, amx_pri_addr_v2, amx_cam_addr_s2,                  amx_addr_out_v2 );////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Port Declarations////////////////////////////////////////////////////////////////////////////input amx_sel_s2;input [19:0] amx_pri_addr_v2;input [19:0] amx_cam_addr_s2;output [19:0] amx_addr_out_v2;/////////////////////////////////////////////////////////////////////////////// Internal Variable Declarations/////////////////////////////////////////////////////////////////////////////wire [19:0] amx_addr_out_v2;// select output based on amx_sel_s2assign amx_addr_out_v2 = (amx_sel_s2 == `ADDR_SEL_PRI) ?                         amx_pri_addr_v2 : amx_cam_addr_s2;endmodule // addr_mux

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?