editing for shard
parent
b330c5d2f1
commit
cf9c7b623e
@ -0,0 +1,154 @@
|
||||
`timescale 1 ns / 1 ns
|
||||
|
||||
`include "toysram.vh"
|
||||
|
||||
module ra_bist_sdr_32x32 (
|
||||
|
||||
clk,
|
||||
reset,
|
||||
ctl,
|
||||
status,
|
||||
rd0_enb_in,
|
||||
rd0_adr_in,
|
||||
rd1_enb_in,
|
||||
rd1_adr_in,
|
||||
wr0_enb_in,
|
||||
wr0_adr_in,
|
||||
wr0_dat_in,
|
||||
rd0_enb_out,
|
||||
rd0_adr_out,
|
||||
rd0_dat,
|
||||
rd1_enb_out,
|
||||
rd1_adr_out,
|
||||
rd1_dat,
|
||||
wr0_enb_out,
|
||||
wr0_adr_out,
|
||||
wr0_dat_out,
|
||||
bist_fail,
|
||||
bist_passed
|
||||
);
|
||||
|
||||
parameter GENMODE = `GENMODE; // 0=NoDelay, 1=Delay
|
||||
|
||||
input clk;
|
||||
input reset;
|
||||
input [0:31] ctl;
|
||||
|
||||
input rd0_enb_in;
|
||||
input [0:4] rd0_adr_in;
|
||||
input rd1_enb_in;
|
||||
input [0:4] rd1_adr_in;
|
||||
input wr0_enb_in;
|
||||
input [0:4] wr0_adr_in;
|
||||
input [0:31] wr0_dat_in;
|
||||
|
||||
output [0:31] status;
|
||||
output rd0_enb_out;
|
||||
output [0:4] rd0_adr_out;
|
||||
input [0:31] rd0_dat;
|
||||
output rd1_enb_out;
|
||||
output [0:4] rd1_adr_out;
|
||||
input [0:31] rd1_dat;
|
||||
output wr0_enb_out;
|
||||
output [0:4] wr0_adr_out;
|
||||
output [0:31] wr0_dat_out;
|
||||
|
||||
reg [0:5] seq_q;
|
||||
wire [0:5] seq_d;
|
||||
wire active;
|
||||
wire bist_rd0_enb;
|
||||
wire [0:4] bist_rd0_adr;
|
||||
wire bist_rd1_enb;
|
||||
wire [0:4] bist_rd1_adr;
|
||||
wire bist_wr0_enb;
|
||||
wire [0:4] bist_wr0_adr;
|
||||
wire [0:31] bist_wr0_dat;
|
||||
|
||||
output bist_fail;
|
||||
output bist_passed;
|
||||
|
||||
// ff
|
||||
always @ (posedge clk) begin
|
||||
if (reset)
|
||||
seq_q <= 6'h3F;
|
||||
else
|
||||
seq_q <= seq_d;
|
||||
end
|
||||
|
||||
// do something
|
||||
assign seq_d = seq_q;
|
||||
assign active = seq_q != 6'h3F;
|
||||
assign status = 0;
|
||||
|
||||
/*
|
||||
A more practical implementation:
|
||||
make an up/down counter for interating through addresses.
|
||||
|
||||
state machine for each part of the step: the best part about this is that
|
||||
states could be added for implementation withb GPIO/wishbone for external
|
||||
controls/different steps.
|
||||
|
||||
s0: write 0s up (Idle)
|
||||
s1: write 1s down
|
||||
s2: read 1s down/check
|
||||
s3: write 0s up
|
||||
s4: read 0s up/check
|
||||
s5: write 1s up
|
||||
s6: read 1s up/check
|
||||
s7: flags
|
||||
|
||||
|
||||
*/
|
||||
/*
|
||||
Outline for BIST
|
||||
----------------------------------------------------------------------
|
||||
first off, how I think this thing is supposed to work is that we need a
|
||||
final flag signifying the BIST is successfully ran, and one where it fa-
|
||||
ils.
|
||||
uhhhhhh something's gotta happen here
|
||||
like:
|
||||
enable write data
|
||||
assign all 0s to addr 0x00-0x3F (using signals wr0_adr_in &
|
||||
wr0_dat_in)
|
||||
|
||||
enable read data (rd0_enb_in)
|
||||
|
||||
read addr 0x00-0x3f one at a time (rd0_adr_in/out and rd0_dat)
|
||||
|
||||
after each read, write all 1s to each addr 0x00-0x3F
|
||||
^^this happens after each read, so like, read data at 0x00, write all
|
||||
ones to 0x00, step forward to next address, 0x01 (process A)
|
||||
|
||||
for each valid read of all 0s, save output in a 6-bit bus that counts
|
||||
up for each valid read or something
|
||||
|
||||
now, step through the exact same read/write process but replacing
|
||||
all 1s with all 0s.
|
||||
|
||||
read all 0s through same process (NO WRITE CHANGE THIS TIME)
|
||||
|
||||
Now, write all 1s to each address 0x3F-0x00.
|
||||
repeat the process A, reading data at each address,replacing all 1s
|
||||
with all 0s for each address 0x3F-0x00, and keeping track of whether
|
||||
working or not.
|
||||
|
||||
finally, read all 0s through same process (NO WRITE HERE EITHER)
|
||||
at the end, there's gotta be some kinda comparison where you check
|
||||
that the tests were valid for both ascending and descending runs.
|
||||
|
||||
if both are valid, flag BIST_PASSED. if one of the runs is invalid,
|
||||
flag BIST_FAIL_UP, or BIST_FAIL_DOWN or both.
|
||||
|
||||
*/
|
||||
|
||||
// outputs
|
||||
assign rd0_enb_out = (active) ? bist_rd0_enb : rd0_enb_in;
|
||||
assign rd0_adr_out = (active) ? bist_rd0_adr : rd0_adr_in;
|
||||
assign rd1_enb_out = (active) ? bist_rd1_enb : rd1_enb_in;
|
||||
assign rd1_adr_out = (active) ? bist_rd1_adr : rd1_adr_in;
|
||||
assign wr0_enb_out = (active) ? bist_wr0_enb : wr0_enb_in;
|
||||
assign wr0_adr_out = (active) ? bist_wr0_adr : wr0_adr_in;
|
||||
assign wr0_dat_out = (active) ? bist_wr0_dat : wr0_dat_in;
|
||||
//assign rd0_dat = (active) ? haven't done anything here yet
|
||||
|
||||
endmodule
|
@ -0,0 +1,160 @@
|
||||
`timescale 1 ns / 1 ns
|
||||
|
||||
`include "toysram.vh"
|
||||
|
||||
module ra_bist_sdr (
|
||||
|
||||
clk,
|
||||
reset, picture,
|
||||
ctl,
|
||||
status,
|
||||
rd0_enb_in,
|
||||
rd0_adr_in,
|
||||
rd1_enb_in,
|
||||
rd1_adr_in,
|
||||
wr0_enb_in,
|
||||
wr0_adr_in,
|
||||
wr0_dat_in,
|
||||
rd0_enb_out,
|
||||
rd0_adr_out,
|
||||
rd0_dat,
|
||||
rd1_enb_out,
|
||||
rd1_adr_out,
|
||||
rd1_dat,
|
||||
wr0_enb_out,
|
||||
wr0_adr_out,
|
||||
wr0_dat_out,
|
||||
bist_fail,
|
||||
bist_passed
|
||||
|
||||
|
||||
);
|
||||
|
||||
parameter GENMODE = `GENMODE; // 0=NoDelay, 1=Delay
|
||||
|
||||
input clk;
|
||||
input reset;
|
||||
input [31:0] ctl;
|
||||
|
||||
input rd0_enb_in;
|
||||
input [5:0] rd0_adr_in;
|
||||
input rd1_enb_in;
|
||||
input [5:0] rd1_adr_in;
|
||||
input wr0_enb_in;
|
||||
input [5:0] wr0_adr_in;
|
||||
input [71:0] wr0_dat_in;
|
||||
|
||||
output [31:0] status;
|
||||
output rd0_enb_out;
|
||||
output [5:0] rd0_adr_out;
|
||||
input [71:0] rd0_dat;
|
||||
output rd1_enb_out;
|
||||
output [5:0] rd1_adr_out;
|
||||
input [71:0] rd1_dat;
|
||||
output wr0_enb_out;
|
||||
output [5:0] wr0_adr_out;
|
||||
output [71:0] wr0_dat_out;
|
||||
|
||||
|
||||
|
||||
reg [5:0] seq_q;
|
||||
wire [5:0] seq_d;
|
||||
wire active;
|
||||
wire bist_rd0_enb;
|
||||
wire [5:0] bist_rd0_adr;
|
||||
wire bist_rd1_enb;
|
||||
wire [5:0] bist_rd1_adr;
|
||||
wire bist_wr0_enb;
|
||||
wire [5:0] bist_wr0_adr;
|
||||
wire [71:0] bist_wr0_dat;
|
||||
|
||||
output bist_fail;
|
||||
output bist_passed;
|
||||
|
||||
// ff
|
||||
always @ (posedge clk) begin
|
||||
if (reset)
|
||||
seq_q <= 6'h3F;
|
||||
else
|
||||
seq_q <= seq_d;
|
||||
end
|
||||
|
||||
// do something
|
||||
assign seq_d = seq_q;
|
||||
assign active = seq_q != 6'h3F;
|
||||
assign status = 0;
|
||||
|
||||
assign wr0_enb_in = 1;
|
||||
|
||||
/*
|
||||
A more practical implementation:
|
||||
make an up/down counter for interating through addresses.
|
||||
|
||||
state machine for each part of the step: the best part about this is that
|
||||
states could be added for implementation withb GPIO/wishbone for external
|
||||
controls/different steps.
|
||||
|
||||
s0: write 0s up (Idle)
|
||||
s1: write 1s down
|
||||
s2: read 1s down/check
|
||||
s3: write 0s up
|
||||
s4: read 0s up/check
|
||||
s5: write 1s up
|
||||
s6: read 1s up/check
|
||||
s7: flags
|
||||
|
||||
|
||||
*/
|
||||
/*
|
||||
Outline for BIST
|
||||
----------------------------------------------------------------------
|
||||
first off, how I think this thing is supposed to work is that we need a
|
||||
final flag signifying the BIST is successfully ran, and one where it fa-
|
||||
ils.
|
||||
uhhhhhh something's gotta happen here
|
||||
like:
|
||||
enable write data
|
||||
assign all 0s to addr 0x00-0x3F (using signals wr0_adr_in &
|
||||
wr0_dat_in)
|
||||
|
||||
enable read data (rd0_enb_in)
|
||||
|
||||
read addr 0x00-0x3f one at a time (rd0_adr_in/out and rd0_dat)
|
||||
|
||||
after each read, write all 1s to each addr 0x00-0x3F
|
||||
^^this happens after each read, so like, read data at 0x00, write all
|
||||
ones to 0x00, step forward to next address, 0x01 (process A)
|
||||
|
||||
for each valid read of all 0s, save output in a 6-bit bus that counts
|
||||
up for each valid read or something
|
||||
|
||||
now, step through the exact same read/write process but replacing
|
||||
all 1s with all 0s.
|
||||
|
||||
read all 0s through same process (NO WRITE CHANGE THIS TIME)
|
||||
|
||||
Now, write all 1s to each address 0x3F-0x00.
|
||||
repeat the process A, reading data at each address,replacing all 1s
|
||||
with all 0s for each address 0x3F-0x00, and keeping track of whether
|
||||
working or not.
|
||||
|
||||
finally, read all 0s through same process (NO WRITE HERE EITHER)
|
||||
at the end, there's gotta be some kinda comparison where you check
|
||||
that the tests were valid for both ascending and descending runs.
|
||||
|
||||
if both are valid, flag BIST_PASSED. if one of the runs is invalid,
|
||||
flag BIST_FAIL_UP, or BIST_FAIL_DOWN or both.
|
||||
|
||||
*/
|
||||
|
||||
// outputs
|
||||
assign rd0_enb_out = (active) ? bist_rd0_enb : rd0_enb_in;
|
||||
assign rd0_adr_out = (active) ? bist_rd0_adr : rd0_adr_in;
|
||||
assign rd1_enb_out = (active) ? bist_rd1_enb : rd1_enb_in;
|
||||
assign rd1_adr_out = (active) ? bist_rd1_adr : rd1_adr_in;
|
||||
assign wr0_enb_out = (active) ? bist_wr0_enb : wr0_enb_in;
|
||||
assign wr0_adr_out = (active) ? bist_wr0_adr : wr0_adr_in;
|
||||
assign wr0_dat_out = (active) ? bist_wr0_dat : wr0_dat_in;
|
||||
//assign rd0_dat = (active) ? haven't done anything here yet
|
||||
|
||||
endmodule
|
@ -0,0 +1,8 @@
|
||||
// Global Parameters for ToySRAM Testsite
|
||||
|
||||
`define GENMODE 0 // 0=NoDelay, 1=Delay
|
||||
|
||||
// RA LCB
|
||||
`define LCBSDR_CONFIGWIDTH 16
|
||||
`define LCBDDR_CONFIGWIDTH 32
|
||||
|
@ -0,0 +1,130 @@
|
||||
# // Questa Sim-64
|
||||
# // Version 2020.3_1 linux_x86_64 Aug 25 2020
|
||||
# //
|
||||
# // Copyright 1991-2020 Mentor Graphics Corporation
|
||||
# // All Rights Reserved.
|
||||
# //
|
||||
# // QuestaSim and its associated documentation contain trade
|
||||
# // secrets and commercial or financial information that are the property of
|
||||
# // Mentor Graphics Corporation and are privileged, confidential,
|
||||
# // and exempt from disclosure under the Freedom of Information Act,
|
||||
# // 5 U.S.C. Section 552. Furthermore, this information
|
||||
# // is prohibited from disclosure under the Trade Secrets Act,
|
||||
# // 18 U.S.C. Section 1905.
|
||||
# //
|
||||
pwd
|
||||
# /home/ptikals/IBM/osu-toy-sram/src
|
||||
do top.do
|
||||
# Cannot open macro file: top.do
|
||||
cd ../sim
|
||||
do top.do
|
||||
# QuestaSim-64 vlog 2020.3_1 Compiler 2020.08 Aug 25 2020
|
||||
# Start time: 11:20:19 on Dec 14,2021
|
||||
# vlog -reportprogress 300 -lint ../src/address_clock_sdr_2r1w_64.v ../src/ra_bist_ddr.v ../src/predecode_sdr_64.v ../src/ra_bist_sdr.v ../src/ra_2r1w_64x72_sdr.v ../src/ra_cfg_ddr.v ../src/regfile_2r1w_64x24.v ../src/toysram.vh ../src/ra_4r2w_64x72_ddr_1x.v ../src/ra_cfg_sdr.v ../src/regfile_4r2w_64x24.v ../src/ra_4r2w_64x72_ddr.v ../src/ra_delay.v ../src/ra_lcb_sdr.v ../src/ra_lcb_ddr.v ../src/test_ra_ddr.v ../src/test_ra_sdr.sv ../src/test_ra_ddr_1x.v
|
||||
# -- Compiling module address_clock_sdr_2r1w_64
|
||||
# -- Compiling module ra_bist_ddr
|
||||
# -- Compiling module predecode_sdr_64
|
||||
# -- Compiling module ra_bist_sdr
|
||||
# -- Compiling module ra_2r1w_64x72_sdr
|
||||
# -- Compiling module ra_cfg_ddr
|
||||
# -- Compiling module regfile_2r1w_64x24
|
||||
# -- Compiling module ra_4r2w_64x72_ddr_1x
|
||||
# -- Compiling module ra_cfg_sdr
|
||||
# -- Compiling module regfile_4r2w_64x24
|
||||
# -- Compiling module ra_4r2w_64x72_ddr
|
||||
# -- Compiling module ra_delay
|
||||
# -- Compiling module ra_lcb_sdr
|
||||
# ** Warning: ../src/ra_lcb_sdr.v(61): (vlog-2623) Undefined variable: i.
|
||||
# -- Compiling module ra_lcb_ddr
|
||||
# -- Compiling module test_ra_ddr
|
||||
# -- Compiling module test_ra_sdr
|
||||
# ** Warning: ../src/test_ra_sdr.sv(28): (vlog-2605) empty port name in port list.
|
||||
# -- Compiling module test_ra_ddr_1x
|
||||
#
|
||||
# Top level modules:
|
||||
# ra_bist_sdr
|
||||
# test_ra_ddr
|
||||
# test_ra_sdr
|
||||
# test_ra_ddr_1x
|
||||
# End time: 11:20:19 on Dec 14,2021, Elapsed time: 0:00:00
|
||||
# Errors: 0, Warnings: 2
|
||||
# vsim -debugdb -voptargs="+acc" work.test_ra_sdr
|
||||
# Start time: 11:20:19 on Dec 14,2021
|
||||
# ** Note: (vsim-3812) Design is being optimized...
|
||||
# ** Note: (vsim-8611) Generating debug db.
|
||||
# ** Error: ../src/test_ra_sdr.sv(85): Module 'ra_bist_sdr_osu' is not defined.
|
||||
# Optimization failed
|
||||
# ** Note: (vsim-12126) Error and warning message counts have been restored: Errors=1, Warnings=0.
|
||||
# Error loading design
|
||||
# Error: Error loading design
|
||||
# Pausing macro execution
|
||||
# MACRO ./top.do PAUSED at line 33
|
||||
do top.do
|
||||
# QuestaSim-64 vlog 2020.3_1 Compiler 2020.08 Aug 25 2020
|
||||
# Start time: 11:29:26 on Dec 14,2021
|
||||
# vlog -reportprogress 300 -lint ../src/address_clock_sdr_2r1w_64.v ../src/ra_bist_ddr.v ../src/predecode_sdr_64.v ../src/ra_bist_sdr_osu.v ../src/ra_2r1w_64x72_sdr.v ../src/ra_cfg_ddr.v ../src/regfile_2r1w_64x24.v ../src/toysram.vh ../src/ra_4r2w_64x72_ddr_1x.v ../src/ra_cfg_sdr.v ../src/regfile_4r2w_64x24.v ../src/ra_4r2w_64x72_ddr.v ../src/ra_delay.v ../src/ra_lcb_sdr.v ../src/ra_lcb_ddr.v ../src/test_ra_ddr.v ../src/test_ra_sdr.sv ../src/test_ra_ddr_1x.v
|
||||
# -- Compiling module address_clock_sdr_2r1w_64
|
||||
# -- Compiling module ra_bist_ddr
|
||||
# -- Compiling module predecode_sdr_64
|
||||
# -- Compiling module ra_bist_sdr
|
||||
# ** Error: ../src/ra_bist_sdr_osu.v(88): (vlog-2730) Undefined variable: 'int'.
|
||||
# ** Error: (vlog-13069) ../src/ra_bist_sdr_osu.v(88): near "i": syntax error, unexpected IDENTIFIER, expecting '='.
|
||||
# ** Error: (vlog-13036) ../src/ra_bist_sdr_osu.v(88): near "++": Operator only allowed in SystemVerilog.
|
||||
# ** Error: ../src/ra_bist_sdr_osu.v(88): (vlog-13205) Syntax error found in the scope following 'i'. Is there a missing '::'?
|
||||
# -- Compiling module ra_2r1w_64x72_sdr
|
||||
# -- Compiling module ra_cfg_ddr
|
||||
# -- Compiling module regfile_2r1w_64x24
|
||||
# -- Compiling module ra_4r2w_64x72_ddr_1x
|
||||
# -- Compiling module ra_cfg_sdr
|
||||
# -- Compiling module regfile_4r2w_64x24
|
||||
# -- Compiling module ra_4r2w_64x72_ddr
|
||||
# -- Compiling module ra_delay
|
||||
# -- Compiling module ra_lcb_sdr
|
||||
# ** Warning: ../src/ra_lcb_sdr.v(61): (vlog-2623) Undefined variable: i.
|
||||
# -- Compiling module ra_lcb_ddr
|
||||
# -- Compiling module test_ra_ddr
|
||||
# -- Compiling module test_ra_sdr
|
||||
# ** Warning: ../src/test_ra_sdr.sv(28): (vlog-2605) empty port name in port list.
|
||||
# -- Compiling module test_ra_ddr_1x
|
||||
# End time: 11:29:26 on Dec 14,2021, Elapsed time: 0:00:00
|
||||
# Errors: 4, Warnings: 2
|
||||
# ** Error: /opt/Mentor/questasim/linux_x86_64/vlog failed.
|
||||
# Error in macro ./top.do line 30
|
||||
# /opt/Mentor/questasim/linux_x86_64/vlog failed.
|
||||
# while executing
|
||||
# "vlog -lint ../src/address_clock_sdr_2r1w_64.v ../src/ra_bist_ddr.v ../src/predecode_sdr_64.v ../src/ra_bist_sdr_osu.v ../src/ra_2r1w_64x72_sdr.v ../sr..."
|
||||
do top.do
|
||||
# QuestaSim-64 vlog 2020.3_1 Compiler 2020.08 Aug 25 2020
|
||||
# Start time: 11:49:53 on Dec 14,2021
|
||||
# vlog -reportprogress 300 -lint ../src/address_clock_sdr_2r1w_64.v ../src/ra_bist_ddr.v ../src/predecode_sdr_64.v ../src/ra_bist_sdr_osu.v ../src/ra_2r1w_64x72_sdr.v ../src/ra_cfg_ddr.v ../src/regfile_2r1w_64x24.v ../src/toysram.vh ../src/ra_4r2w_64x72_ddr_1x.v ../src/ra_cfg_sdr.v ../src/regfile_4r2w_64x24.v ../src/ra_4r2w_64x72_ddr.v ../src/ra_delay.v ../src/ra_lcb_sdr.v ../src/ra_lcb_ddr.v ../src/test_ra_ddr.v ../src/test_ra_sdr.sv ../src/test_ra_ddr_1x.v
|
||||
# -- Compiling module address_clock_sdr_2r1w_64
|
||||
# -- Compiling module ra_bist_ddr
|
||||
# -- Compiling module predecode_sdr_64
|
||||
# -- Compiling module ra_bist_sdr
|
||||
# ** Error: ../src/ra_bist_sdr_osu.v(88): (vlog-2730) Undefined variable: 'int'.
|
||||
# ** Error: (vlog-13069) ../src/ra_bist_sdr_osu.v(88): near "i": syntax error, unexpected IDENTIFIER, expecting '='.
|
||||
# ** Error: ../src/ra_bist_sdr_osu.v(88): (vlog-13205) Syntax error found in the scope following 'i'. Is there a missing '::'?
|
||||
# -- Compiling module ra_2r1w_64x72_sdr
|
||||
# -- Compiling module ra_cfg_ddr
|
||||
# -- Compiling module regfile_2r1w_64x24
|
||||
# -- Compiling module ra_4r2w_64x72_ddr_1x
|
||||
# -- Compiling module ra_cfg_sdr
|
||||
# -- Compiling module regfile_4r2w_64x24
|
||||
# -- Compiling module ra_4r2w_64x72_ddr
|
||||
# -- Compiling module ra_delay
|
||||
# -- Compiling module ra_lcb_sdr
|
||||
# ** Warning: ../src/ra_lcb_sdr.v(61): (vlog-2623) Undefined variable: i.
|
||||
# -- Compiling module ra_lcb_ddr
|
||||
# -- Compiling module test_ra_ddr
|
||||
# -- Compiling module test_ra_sdr
|
||||
# ** Warning: ../src/test_ra_sdr.sv(28): (vlog-2605) empty port name in port list.
|
||||
# -- Compiling module test_ra_ddr_1x
|
||||
# End time: 11:49:53 on Dec 14,2021, Elapsed time: 0:00:00
|
||||
# Errors: 3, Warnings: 2
|
||||
# ** Error: /opt/Mentor/questasim/linux_x86_64/vlog failed.
|
||||
# Error in macro ./top.do line 30
|
||||
# /opt/Mentor/questasim/linux_x86_64/vlog failed.
|
||||
# while executing
|
||||
# "vlog -lint ../src/address_clock_sdr_2r1w_64.v ../src/ra_bist_ddr.v ../src/predecode_sdr_64.v ../src/ra_bist_sdr_osu.v ../src/ra_2r1w_64x72_sdr.v ../sr..."
|
||||
# End time: 12:39:15 on Dec 14,2021, Elapsed time: 1:18:56
|
||||
# Errors: 3, Warnings: 0
|
Loading…
Reference in New Issue