mirror of
https://github.com/pConst/basic_verilog.git
synced 2025-01-28 07:02:55 +08:00
snake_case for reverse_vector module and its testbench
This commit is contained in:
parent
842496f0da
commit
2d8e67db35
6
ReverseVector.sv → reverse_vector.sv
Executable file → Normal file
6
ReverseVector.sv → reverse_vector.sv
Executable file → Normal file
@ -1,5 +1,5 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// ReverseVector.sv
|
// reverse_vector.sv
|
||||||
// Konstantin Pavlov, pavlovconst@gmail.com
|
// Konstantin Pavlov, pavlovconst@gmail.com
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
/* --- INSTANTIATION TEMPLATE BEGIN ---
|
/* --- INSTANTIATION TEMPLATE BEGIN ---
|
||||||
|
|
||||||
ReverseVector #(
|
reverse_vector #(
|
||||||
.WIDTH( 8 ) // WIDTH must be >=2
|
.WIDTH( 8 ) // WIDTH must be >=2
|
||||||
) RV1 (
|
) RV1 (
|
||||||
.in( smth[7:0] ),
|
.in( smth[7:0] ),
|
||||||
@ -21,7 +21,7 @@ ReverseVector #(
|
|||||||
--- INSTANTIATION TEMPLATE END ---*/
|
--- INSTANTIATION TEMPLATE END ---*/
|
||||||
|
|
||||||
|
|
||||||
module ReverseVector #(
|
module reverse_vector #(
|
||||||
WIDTH = 8 // WIDTH must be >=2
|
WIDTH = 8 // WIDTH must be >=2
|
||||||
)(
|
)(
|
||||||
input [(WIDTH-1):0] in,
|
input [(WIDTH-1):0] in,
|
10
ReverseVector_tb.sv → reverse_vector_tb.sv
Executable file → Normal file
10
ReverseVector_tb.sv → reverse_vector_tb.sv
Executable file → Normal file
@ -1,15 +1,15 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// ReverseVector_tb.sv
|
// reverse_vector_tb.sv
|
||||||
// Konstantin Pavlov, pavlovconst@gmail.com
|
// Konstantin Pavlov, pavlovconst@gmail.com
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
// INFO ------------------------------------------------------------------------
|
// INFO ------------------------------------------------------------------------
|
||||||
// testbench for ReverseVector module
|
// testbench for reverse_vector module
|
||||||
|
|
||||||
|
|
||||||
`timescale 1ns / 1ps
|
`timescale 1ns / 1ps
|
||||||
|
|
||||||
module main_tb();
|
module reverse_vector_tb();
|
||||||
|
|
||||||
logic clk200;
|
logic clk200;
|
||||||
initial begin
|
initial begin
|
||||||
@ -84,7 +84,7 @@ end
|
|||||||
|
|
||||||
// odd width
|
// odd width
|
||||||
logic [14:0] reversed1;
|
logic [14:0] reversed1;
|
||||||
ReverseVector #(
|
reverse_vector #(
|
||||||
.WIDTH( 15 ) // WIDTH must be >=2
|
.WIDTH( 15 ) // WIDTH must be >=2
|
||||||
) RV1 (
|
) RV1 (
|
||||||
.in( RandomNumber1[14:0] ),
|
.in( RandomNumber1[14:0] ),
|
||||||
@ -93,7 +93,7 @@ ReverseVector #(
|
|||||||
|
|
||||||
// even width
|
// even width
|
||||||
logic [13:0] reversed2;
|
logic [13:0] reversed2;
|
||||||
ReverseVector #(
|
reverse_vector #(
|
||||||
.WIDTH( 14 ) // WIDTH must be >=2
|
.WIDTH( 14 ) // WIDTH must be >=2
|
||||||
) RV2 (
|
) RV2 (
|
||||||
.in( reversed1[13:0] ),
|
.in( reversed1[13:0] ),
|
Loading…
x
Reference in New Issue
Block a user