Sha256: 706a968d7407be5f058b90d988045c2f4531758d461d8a59affa3de2628f6447

Contents?: true

Size: 393 Bytes

Versions: 7

Compression:

Stored size: 393 Bytes

Contents

module register_file (
  input wire [1:0] rdReg,
  input wire [1:0] wtReg,
  input wire       rw,
  input wire       enable,
  input wire [3:0] inBus,
  output reg [3:0] outBus
);
  reg [3:0] register [0:3];

  always @(rdReg, wtReg, rw, enable) begin
    if (rw == 0) begin
      outBus = register[rdReg];
    end else if (enable) begin
      register[wtReg] = inBus;
    end
  end
endmodule

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-vpi-18.0.0 samp/register_file/register_file.v
ruby-vpi-19.0.0 examples/register_file/register_file.v
ruby-vpi-20.0.0 examples/register_file/register_file.v
ruby-vpi-18.0.1 samp/register_file/register_file.v
ruby-vpi-18.0.2 samp/register_file/register_file.v
ruby-vpi-21.0.0 examples/register_file/register_file.v
ruby-vpi-21.1.0 examples/register_file/register_file.v