Some cleanup and added formal for the banks and timer
This commit is contained in:
53
cores/wb/wb_gpio_banks/formal/formal_wb_gpio_banks.v
Normal file
53
cores/wb/wb_gpio_banks/formal/formal_wb_gpio_banks.v
Normal file
@@ -0,0 +1,53 @@
|
||||
`timescale 1ns/1ps
|
||||
|
||||
module formal_wb_gpio_banks #(
|
||||
parameter integer NUM_BANKS = 2,
|
||||
parameter [31:0] BASE_ADDR = 32'h00000000
|
||||
);
|
||||
(* gclk *) reg i_wb_clk;
|
||||
(* anyseq *) reg i_rst;
|
||||
(* anyseq *) reg i_wb_rst;
|
||||
(* anyseq *) reg [31:0] i_wb_adr;
|
||||
(* anyseq *) reg [31:0] i_wb_dat;
|
||||
(* anyseq *) reg [3:0] i_wb_sel;
|
||||
(* anyseq *) reg i_wb_we;
|
||||
(* anyseq *) reg i_wb_stb;
|
||||
(* anyseq *) reg [NUM_BANKS*32-1:0] i_gpio;
|
||||
wire [31:0] o_wb_rdt;
|
||||
wire o_wb_ack;
|
||||
wire [NUM_BANKS*32-1:0] o_gpio;
|
||||
wire i_wb_cyc;
|
||||
|
||||
assign i_wb_cyc = i_wb_stb || o_wb_ack;
|
||||
|
||||
wb_gpio_banks #(
|
||||
.NUM_BANKS(NUM_BANKS),
|
||||
.BASE_ADDR(BASE_ADDR)
|
||||
) dut (
|
||||
.i_wb_clk(i_wb_clk),
|
||||
.i_wb_rst(i_wb_rst),
|
||||
.i_wb_adr(i_wb_adr),
|
||||
.i_wb_dat(i_wb_dat),
|
||||
.i_wb_sel(i_wb_sel),
|
||||
.i_wb_we(i_wb_we),
|
||||
.i_wb_stb(i_wb_stb),
|
||||
.i_gpio(i_gpio),
|
||||
.o_wb_rdt(o_wb_rdt),
|
||||
.o_wb_ack(o_wb_ack),
|
||||
.o_gpio(o_gpio)
|
||||
);
|
||||
|
||||
formal_wb_slave_checker wb_checker (
|
||||
.i_clk(i_wb_clk),
|
||||
.i_rst(i_rst),
|
||||
.i_wb_rst(i_wb_rst),
|
||||
.i_wb_adr(i_wb_adr),
|
||||
.i_wb_dat(i_wb_dat),
|
||||
.i_wb_sel(i_wb_sel),
|
||||
.i_wb_we(i_wb_we),
|
||||
.i_wb_stb(i_wb_stb),
|
||||
.i_wb_cyc(i_wb_cyc),
|
||||
.o_wb_rdt(o_wb_rdt),
|
||||
.o_wb_ack(o_wb_ack)
|
||||
);
|
||||
endmodule
|
||||
23
cores/wb/wb_gpio_banks/formal/wb_gpio_banks.sby
Normal file
23
cores/wb/wb_gpio_banks/formal/wb_gpio_banks.sby
Normal file
@@ -0,0 +1,23 @@
|
||||
[tasks]
|
||||
prove
|
||||
cover
|
||||
bmc
|
||||
|
||||
[options]
|
||||
bmc: mode bmc
|
||||
bmc: depth 50
|
||||
cover: mode cover
|
||||
cover: depth 50
|
||||
prove: mode prove
|
||||
|
||||
[engines]
|
||||
bmc: smtbmc yices
|
||||
cover: smtbmc yices
|
||||
prove: abc pdr
|
||||
|
||||
[script]
|
||||
{{"-formal"|gen_reads}}
|
||||
prep -top {{top_level}}
|
||||
|
||||
[files]
|
||||
{{files}}
|
||||
@@ -10,6 +10,16 @@ filesets:
|
||||
files:
|
||||
- rtl/wb_gpio_banks.v
|
||||
file_type: verilogSource
|
||||
formal_rtl:
|
||||
depend:
|
||||
- joppeb:wb:formal_checker
|
||||
files:
|
||||
- formal/formal_wb_gpio_banks.v
|
||||
file_type: verilogSource
|
||||
formal_cfg:
|
||||
files:
|
||||
- formal/wb_gpio_banks.sby
|
||||
file_type: sbyConfigTemplate
|
||||
|
||||
targets:
|
||||
default:
|
||||
@@ -19,6 +29,16 @@ targets:
|
||||
parameters:
|
||||
- NUM_BANKS
|
||||
- BASE_ADDR
|
||||
formal:
|
||||
default_tool: symbiyosys
|
||||
filesets:
|
||||
- rtl
|
||||
- formal_rtl
|
||||
- formal_cfg
|
||||
toplevel: formal_wb_gpio_banks
|
||||
parameters:
|
||||
- NUM_BANKS
|
||||
- BASE_ADDR
|
||||
|
||||
parameters:
|
||||
NUM_BANKS:
|
||||
|
||||
Reference in New Issue
Block a user