URL
https://opencores.org/ocsvn/8051/8051/trunk
[/] [8051/] [trunk/] [rtl/] [verilog/] [oc8051_comp.v] - Diff between revs 2 and 9
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 9 |
Line 63... |
Line 63... |
// des (in) destination from alu [oc8051_alu.des1 -r]
|
// des (in) destination from alu [oc8051_alu.des1 -r]
|
// eq (out) if (src1 == src2) eq = 1 [oc8051_decoder.eq]
|
// eq (out) if (src1 == src2) eq = 1 [oc8051_decoder.eq]
|
//
|
//
|
|
|
|
|
input [2:0] sel;
|
input [1:0] sel;
|
input b_in, cy;
|
input b_in, cy;
|
input [7:0] acc, ram, op2, des;
|
input [7:0] acc, ram, op2, des;
|
|
|
output eq;
|
output eq;
|
reg eq;
|
reg eq;
|
|
|
always @(sel or b_in or cy or acc or ram or op2 or des)
|
always @(sel or b_in or cy or acc or ram or op2 or des)
|
begin
|
begin
|
case (sel)
|
case (sel)
|
`OC8051_CSS_AZ : eq = (acc == 8'h00);
|
`OC8051_CSS_AZ : eq = (acc == 8'h00);
|
`OC8051_CSS_AR : eq = (acc == ram);
|
|
`OC8051_CSS_AC : eq = (acc == op2);
|
|
`OC8051_CSS_CR : eq = (op2 == ram);
|
|
`OC8051_CSS_DES : eq = (des == 8'h00);
|
`OC8051_CSS_DES : eq = (des == 8'h00);
|
`OC8051_CSS_CY : eq = cy;
|
`OC8051_CSS_CY : eq = cy;
|
`OC8051_CSS_BIT : eq = b_in;
|
`OC8051_CSS_BIT : eq = b_in;
|
default: eq = 1'bx;
|
default: eq = 1'bx;
|
endcase
|
endcase
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.