The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2024, 4:24pm
Pages: 1
Send Topic Print
wires to vec in VerilogA (Read 447 times)
jmith
New Member
*
Offline



Posts: 6

wires to vec in VerilogA
Feb 14th, 2013, 6:09am
 
Im trying to make a wires to vector converter module in VerilogA. Is this correct?

Code:
module wires_to_vec(a, b, q);
 input a, b;
 output [0:1] q;
 electrical a, b;
 electrical [0:1] q;

 analog
 begin
  V(q[0]) <+ V(a);
  V(q[1]) <+ V(b);
 end

endmodule

 

Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: wires to vec in VerilogA
Reply #1 - Feb 15th, 2013, 6:09am
 
Jmith,
your code is equivalent to voltage-controlled voltage sources at q[0:1].
Is that what you want?

- B O E
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.