OpenCores
URL https://opencores.org/ocsvn/8051/8051/trunk

Subversion Repositories 8051

[/] [8051/] [tags/] [rel_12/] [rtl/] [verilog/] [oc8051_comp.v] - Diff between revs 95 and 132

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 95 Rev 132
Line 43... Line 43...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.6  2003/04/02 11:26:21  simont
 
// updating...
 
//
// Revision 1.5  2002/09/30 17:33:59  simont
// Revision 1.5  2002/09/30 17:33:59  simont
// prepared header
// prepared header
//
//
//
//
 
 
Line 55... Line 58...
// synopsys translate_on
// synopsys translate_on
 
 
`include "oc8051_defines.v"
`include "oc8051_defines.v"
 
 
 
 
module oc8051_comp (sel, b_in, cy, acc, des, eq);
module oc8051_comp (sel, b_in, cy, acc, des, /*comp_wait, */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 69... Line 72...
// eq           (out) if (src1 == src2) eq = 1  [oc8051_decoder.eq]
// eq           (out) if (src1 == src2) eq = 1  [oc8051_decoder.eq]
//
//
 
 
 
 
input [1:0] sel;
input [1:0] sel;
input b_in, cy;
input b_in, cy/*, comp_wait*/;
input [7:0] acc, des;
input [7:0] acc, des;
 
 
output eq;
output eq;
reg eq;
 
 
reg eq_r;
 
 
 
assign eq = eq_r;// & comp_wait;
 
 
 
 
always @(sel or b_in or cy or acc 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_r = (acc == 8'h00);
    `OC8051_CSS_DES : eq = (des == 8'h00);
    `OC8051_CSS_DES : eq_r = (des == 8'h00);
    `OC8051_CSS_CY : eq = cy;
    `OC8051_CSS_CY  : eq_r = cy;
    `OC8051_CSS_BIT : eq = b_in;
    `OC8051_CSS_BIT : eq_r = b_in;
    default: eq = 1'bx;
    default:          eq_r = 1'bx;
  endcase
  endcase
end
end
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.