Re: model pmos and nmos in VHDL



Hello
Thanks. On doing a search I also found that VITALbufif1 can be used
for nmos. Is that OK to use vitalbufif1 to model nmos?

Thanks
kc
Jonathan Bromley wrote:
On 19 Jun 2006 10:51:50 -0700, krithiga81@xxxxxxxxx wrote:

Hello
I am new to VHDL and would like to know how to model pmos and nmos in
VHDL. In verilog we use the keyword pmos and nmos. IS there an
equivalent in VHDL? Please provide an example

There's no direct equivalent; VHDL does not have Verilog's
switch-level primitives.

Verilog's pmos and nmos are actually easy enough to reproduce in
VHDL, because they are unidirectional. The real problems start
when you try to model bidirectional primitives (tran, tranif...);
this is really tough in VHDL, and gave rise to a flurry of academic
papers in the late 1980s. If you Google for "zero ohm link VHDL"
you will almost certainly find the models on Ben Cohen's
website, which are a lot better than nothing although they do
have certain limitations.

Finally, note that VHDL users commonly use std_(u)logic to model
digital signals; with only two possible driving strengths other than
hi-Z, this is somewhat less expressive than the nine strengths
you can use on Verilog nets. It's easy to make a VHDL data
type that roughly mimics the behaviour of Verilog drive strength
(apart from the capacitive hold magic) but of course it won't be
standard, and you will need to write conversion functions to map
it to and from std_logic.

Oh, the pmos and nmos models...

entity nmos is
port (
p_Out : out std_logic;
p_In : in std_logic;
p_Gate: in std_logic
);
end;
architecture Simple of nmos is
begin
process(p_In, p_Gate)
variable control: std_Logic;
begin
case p_Gate is
when '0' | 'L' => p_Out <= 'Z';
when '1' | 'H' => p_Out <= p_In;
when others => p_Out <= 'X';
end case;
end process;
end;

rnmos can be modelled by using a "weakening" function on the
input, so that '1' and '0' on the input are mapped to 'H' and 'L'
respectively.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@xxxxxxxxxxxxx
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.

.



Relevant Pages

  • Re: model pmos and nmos in VHDL
    ... I am new to VHDL and would like to know how to model pmos and nmos in ... In verilog we use the keyword pmos and nmos. ...
    (comp.lang.vhdl)
  • model pmos and nmos in VHDL
    ... I am new to VHDL and would like to know how to model pmos and nmos in ... In verilog we use the keyword pmos and nmos. ...
    (comp.lang.vhdl)
  • Re: eliminating CMRR problems -- was, 3 dB bandwidth
    ... Mike Monett wrote... ... > I tried two NMOS and PMOS in series with one NPN/PNP driver for each pair. ... I gather your setup is the common NMOS + PMOS follower circuit? ...
    (sci.electronics.design)
  • Re: CMOS inverter dynamic behavior!
    ... And PMOS is ON. ... So the Vout is Vdd. ... means that the PMOS is in linear region. ... When Vin> Vthn, NMOS is ON. ...
    (sci.electronics.basics)
  • Re: ledit and pspice
    ... You need a .MODEL statement defining the MOSFET. ... it's Nmos. ... But be cautious with an extractor that can't find ... add PMOS and the "bulk" can usually be arbitrarily ...
    (sci.electronics.design)