Line 1... |
Line 1... |
// $Id: edk32.v,v 1.5 2007-11-09 20:51:53 sybreon Exp $
|
// $Id: edk32.v,v 1.6 2007-11-13 23:37:28 sybreon Exp $
|
//
|
//
|
// AEMB EDK 3.2 Compatible Core TEST
|
// AEMB EDK 3.2 Compatible Core TEST
|
//
|
//
|
// Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
// Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
//
|
//
|
Line 18... |
Line 18... |
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
// USA
|
// USA
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.5 2007/11/09 20:51:53 sybreon
|
|
// Added GET/PUT support through a FSL bus.
|
|
//
|
// Revision 1.4 2007/11/08 14:18:00 sybreon
|
// Revision 1.4 2007/11/08 14:18:00 sybreon
|
// Parameterised optional components.
|
// Parameterised optional components.
|
//
|
//
|
// Revision 1.3 2007/11/05 10:59:31 sybreon
|
// Revision 1.3 2007/11/05 10:59:31 sybreon
|
// Added random seed for simulation.
|
// Added random seed for simulation.
|
Line 44... |
Line 47... |
|
|
reg sys_clk_i, sys_rst_i, sys_int_i, sys_exc_i;
|
reg sys_clk_i, sys_rst_i, sys_int_i, sys_exc_i;
|
reg svc;
|
reg svc;
|
integer inttime;
|
integer inttime;
|
integer seed;
|
integer seed;
|
|
integer theend;
|
|
|
always #5 sys_clk_i = ~sys_clk_i;
|
always #5 sys_clk_i = ~sys_clk_i;
|
|
|
initial begin
|
initial begin
|
$dumpfile("dump.vcd");
|
//$dumpfile("dump.vcd");
|
$dumpvars(1,dut);
|
//$dumpvars(1,dut);
|
end
|
end
|
|
|
initial begin
|
initial begin
|
seed = randseed;
|
seed = randseed;
|
|
theend = 0;
|
svc = 0;
|
svc = 0;
|
sys_clk_i = $random(seed);
|
sys_clk_i = $random(seed);
|
sys_rst_i = 1;
|
sys_rst_i = 1;
|
sys_int_i = 0;
|
sys_int_i = 0;
|
sys_exc_i = 0;
|
sys_exc_i = 0;
|
Line 136... |
Line 141... |
// DISPLAY OUTPUTS ///////////////////////////////////////////////////
|
// DISPLAY OUTPUTS ///////////////////////////////////////////////////
|
|
|
//assign dut.rRESULT = dut.rSIMM;
|
//assign dut.rRESULT = dut.rSIMM;
|
|
|
integer rnd;
|
integer rnd;
|
|
|
always @(posedge sys_clk_i) begin
|
always @(posedge sys_clk_i) begin
|
|
|
// Interrupt Monitors
|
// Interrupt Monitors
|
if (!dut.rMSR_IE) begin
|
if (!dut.rMSR_IE) begin
|
rnd = $random % 30;
|
rnd = $random % 30;
|
Line 159... |
Line 165... |
// Pass/Fail Monitors
|
// Pass/Fail Monitors
|
if (dwb_we_o & (dwb_dat_o == "FAIL")) begin
|
if (dwb_we_o & (dwb_dat_o == "FAIL")) begin
|
$display("\n\tFAIL");
|
$display("\n\tFAIL");
|
$finish;
|
$finish;
|
end
|
end
|
|
|
if (iwb_dat_i == 32'hb8000000) begin
|
if (iwb_dat_i == 32'hb8000000) begin
|
|
theend = theend + 1;
|
|
end
|
|
|
|
if (theend == 5) begin
|
$display("\n\t*** PASSED ALL TESTS ***");
|
$display("\n\t*** PASSED ALL TESTS ***");
|
$finish;
|
$finish;
|
end
|
end
|
end // always @ (posedge sys_clk_i)
|
end // always @ (posedge sys_clk_i)
|
|
|