4: Module Instantiation - AmeerAbdelhadi/Indirectly-Indexed-2D-Binary-Content-Addressable-Memory-BCAM GitHub Wiki

All .v &.vh files in this package should be copied into your work directory. Copy the following instantiation, change parameters and connectivity to fit your design.

  // instantiate a II-2D-BCAM
  ii2dcam #(
    .CDEP (CDEP), // depth (k-entries, power of 2)
    .PWID (PWID), // pattern width (9-bits multiply)
    .PIPE (PIPE), // pipelined?
    .REGI (REGI), // register inputs
    .REGO (REGO)  // register outputs
  ) ii2dcam_inst (
    .clk  (clk  ), // clock               / input
    .rst  (rst  ), // global reset        / input
    .wEnb (wEnb ), // write enable        / input
    .wAddr(wAddr), // write address       / input  [log2(CDEP)+9:0]
    .mPatt(mPatt), // match pattern       / input  [PWID*9-1    :0]
    .wPatt(wPatt), // write pattern       / input  [PWID*9-1    :0]
    .match(match), // match (valid mAddr) / output
    .mAddr(mAddr)  // match address       / output [log2(CDEP)+9:0]
);