URL
https://opencores.org/ocsvn/t6507lp/t6507lp/trunk
[/] [t6507lp/] [trunk/] [sim/] [T6507LP_ULA/] [T6507LP_ALU_TestBench.v] - Diff between revs 80 and 81
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 80 |
Rev 81 |
Line 21... |
Line 21... |
.alu_status (alu_status),
|
.alu_status (alu_status),
|
.alu_opcode (alu_opcode),
|
.alu_opcode (alu_opcode),
|
.alu_a (alu_a)
|
.alu_a (alu_a)
|
);
|
);
|
|
|
localparam period = 10;
|
/*
|
|
localparam period = 10;
|
|
|
always begin
|
always begin
|
#(period/2) clk_i = ~clk_i;
|
#(period/2) clk_i = ~clk_i;
|
end
|
end
|
|
|
|
|
initial
|
initial
|
begin
|
begin
|
clk_i = 0;
|
clk_i = 0;
|
n_rst_i = 1;
|
n_rst_i = 1;
|
@(negedge clk_i);
|
@(negedge clk_i);
|
n_rst_i = 0;
|
n_rst_i = 0;
|
alu_opcode = LDA_IMM;
|
alu_opcode = LDA_IMM;
|
alu_a = 0;
|
alu_a = 0;
|
@(negedge clk_i);
|
@(negedge clk_i);
|
alu_opcode = ADC_IMM;
|
alu_opcode = ADC_IMM;
|
alu_a = 1;
|
alu_a = 1;
|
while (1) begin
|
while (1) begin
|
$display("op1 = %h op2 = c = %h d = %h n = %h v = %h ", alu_a, alu_status[C], alu_status[D], alu_status[N], alu_status[V]);
|
$display("op1 = %h op2 = c = %h d = %h n = %h v = %h ", alu_a, alu_status[C], alu_status[D], alu_status[N], alu_status[V]);
|
end
|
end
|
$finish;
|
$finish;
|
end
|
end
|
|
*/
|
endmodule
|
endmodule
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.