Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

type of operation this verilog prog is performing?

Status
Not open for further replies.

rohit.dignity

Newbie level 2
Joined
Apr 23, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Allahabad
Activity points
1,291
'define CM_8 8'b11111111
'define C0_8 8'b00000000
module PCSADD;
input [15:0] a;
input [ 7:0] b;
output [15:0] r;

reg [15:0] v1, v2;
reg [15:0] r;//+
begin
v1 = a;
if( b[7] == 1'b1 )
v2 = {`CM_8, b};
else
v2 = {`C0_8, b};
v1 = v1 + v2;
r = v1;
end
endmodule
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top