URL
https://opencores.org/ocsvn/openmsp430/openmsp430/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 136 |
Rev 193 |
Line 34... |
Line 34... |
//
|
//
|
// *Author(s):
|
// *Author(s):
|
// - Olivier Girard, olgirard@gmail.com
|
// - Olivier Girard, olgirard@gmail.com
|
//
|
//
|
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
// $Rev: 136 $
|
// $Rev: 193 $
|
// $LastChangedBy: olivier.girard $
|
// $LastChangedBy: olivier.girard $
|
// $LastChangedDate: 2012-03-22 22:14:16 +0100 (Thu, 22 Mar 2012) $
|
// $LastChangedDate: 2013-12-17 21:16:33 +0100 (Tue, 17 Dec 2013) $
|
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
`ifdef OMSP_NO_INCLUDE
|
`ifdef OMSP_NO_INCLUDE
|
`else
|
`else
|
`include "openMSP430_defines.v"
|
`include "openMSP430_defines.v"
|
`endif
|
`endif
|
Line 95... |
Line 95... |
input [3:0] Y;
|
input [3:0] Y;
|
input C_;
|
input C_;
|
|
|
reg [4:0] Z_;
|
reg [4:0] Z_;
|
begin
|
begin
|
Z_ = {1'b0,X}+{1'b0,Y}+{4'b0,C_};
|
Z_ = {1'b0,X}+{1'b0,Y}+{4'b0000,C_};
|
if (Z_<5'd10) bcd_add = Z_;
|
if (Z_<5'd10) bcd_add = Z_;
|
else bcd_add = Z_+5'd6;
|
else bcd_add = Z_+5'd6;
|
end
|
end
|
|
|
endfunction
|
endfunction
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.