URL
https://opencores.org/ocsvn/socgen/socgen/trunk
Subversion Repositories socgen
[/] [socgen/] [trunk/] [Projects/] [opencores.org/] [logic/] [ip/] [ps2_interface/] [sim/] [icarus/] [mouse/] [test_define] - Rev 131
Compare with Previous | Blame | View Log
initial
begin
$display(" ");
$display(" ===================================================");
$display("%t Test Start",$realtime);
$display(" ===================================================");
$display(" ");
test.cg.next(20);
test.cg.next(10);
fork
begin
test.ps2_host.send_byte (8'hff);
test.cg.next(100);
test.ps2_host.clear_rx_host;
test.ps2_host.rcv_byte(8'hfa);
test.cg.next(100);
test.ps2_host.clear_rx_host;
test.ps2_host.rcv_byte(8'haa);
test.cg.next(100);
test.ps2_host.clear_rx_host;
test.ps2_host.rcv_byte(8'h00);
test.cg.next(100);
test.ps2_host.send_byte (8'hf3);
test.cg.next(100);
test.ps2_host.send_byte (8'hc8);
test.cg.next(100);
test.ps2_host.send_byte (8'hf3);
test.cg.next(100);
test.ps2_host.send_byte (8'h64);
test.cg.next(100);
test.ps2_host.send_byte (8'hf3);
test.cg.next(100);
test.ps2_host.send_byte (8'h50);
test.cg.next(100);
test.ps2_host.send_byte (8'hf2);
test.cg.next(1000);
test.ps2_host.clear_rx_host;
test.ps2_host.rcv_byte(8'hfa);
test.cg.next(100);
test.ps2_host.send_byte (8'he8);
test.cg.next(100);
test.ps2_host.send_byte (8'h03);
test.cg.next(100);
test.ps2_host.send_byte (8'hf3);
test.cg.next(100);
test.ps2_host.send_byte (8'h28);
test.cg.next(100);
test.ps2_host.send_byte (8'hf4);
end
begin
test.ps2_model.rcv_byte(8'hff,1'b1);
test.cg.next(5000);
test.ps2_model.send_byte(8'hfa);
test.cg.next(20000);
test.ps2_model.send_byte(8'haa);
test.cg.next(20000);
test.ps2_model.send_byte(8'h00);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'hf3,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'hc8,1'b0);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'hf3,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'h64,1'b0);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'hf3,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'h50,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'hf2,1'b0);
test.cg.next(4000);
test.ps2_model.send_byte(8'hfa);
test.cg.next(1000);
test.ps2_model.rcv_byte(8'he8,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'h03,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'hf3,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'h28,1'b1);
test.cg.next(2000);
test.ps2_model.rcv_byte(8'hf4,1'b0);
// Now send mice packets
test.ps2_model.send_byte(8'h12);
test.cg.next(2000);
test.ps2_model.send_byte(8'h34);
test.cg.next(2000);
test.ps2_model.send_byte(8'h56);
test.cg.next(2000);
test.ps2_model.send_byte(8'h78);
test.cg.next(2000);
test.ps2_model.send_byte(8'h9a);
test.cg.next(2000);
test.ps2_model.send_byte(8'hbc);
test.cg.next(2000);
test.ps2_model.send_byte(8'hde);
test.cg.next(2000);
test.ps2_model.send_byte(8'hf0);
test.cg.next(2000);
test.ps2_model.send_byte(8'h01);
test.cg.next(2000);
test.ps2_model.send_byte(8'h23);
test.cg.next(2000);
test.ps2_model.send_byte(8'h45);
test.cg.next(2000);
test.ps2_model.send_byte(8'h67);
test.cg.next(2000);
test.ps2_model.send_byte(8'h89);
test.cg.next(2000);
test.ps2_model.send_byte(8'hab);
test.cg.next(2000);
test.ps2_model.send_byte(8'hcd);
test.cg.next(2000);
end
join
test.cg.exit;
end