URL
https://opencores.org/ocsvn/8051/8051/trunk
[/] [8051/] [tags/] [rel_12/] [rtl/] [verilog/] [oc8051_comp.v] - Diff between revs 10 and 16
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 10 |
Rev 16 |
Line 50... |
Line 50... |
// synopsys translate_on
|
// synopsys translate_on
|
|
|
`include "oc8051_defines.v"
|
`include "oc8051_defines.v"
|
|
|
|
|
module oc8051_comp (sel, b_in, cy, acc, ram, op2, des, eq);
|
module oc8051_comp (sel, b_in, cy, acc, des, eq);
|
//
|
//
|
// sel (in) select whithc sourses to compare (look defines.v) [oc8051_decoder.comp_sel]
|
// sel (in) select whithc sourses to compare (look defines.v) [oc8051_decoder.comp_sel]
|
// b_in (in) bit in - output from bit addressable memory space [oc8051_ram_sel.bit_out]
|
// b_in (in) bit in - output from bit addressable memory space [oc8051_ram_sel.bit_out]
|
// cy (in) carry flag [oc8051_psw.data_out[7] ]
|
// cy (in) carry flag [oc8051_psw.data_out[7] ]
|
// acc (in) accumulator [oc8051_acc.data_out]
|
// acc (in) accumulator [oc8051_acc.data_out]
|
Line 65... |
Line 65... |
//
|
//
|
|
|
|
|
input [1: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, 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 des)
|
begin
|
begin
|
case (sel)
|
case (sel)
|
`OC8051_CSS_AZ : eq = (acc == 8'h00);
|
`OC8051_CSS_AZ : eq = (acc == 8'h00);
|
`OC8051_CSS_DES : eq = (des == 8'h00);
|
`OC8051_CSS_DES : eq = (des == 8'h00);
|
`OC8051_CSS_CY : eq = cy;
|
`OC8051_CSS_CY : eq = cy;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.