|
From: Martin W. <mai...@ma...> - 2014-03-16 09:57:34
|
To expand a bit on what Steve said, for each library component you need to
create a module that just defines the input/output pins of that component. For
example:
module 74LS245(
input nEN,
input DIR,
inout [8:1] A,
inout [8:1] B
);
endmodule
To create a library, you can either create a separate file for each component
in a common directory and use the -y command line option to get iverilog to
search that directory (the file names must match the module names for this to
work), or you can put a number of components in a single file and use the -v
command line option to get iverilog to read that file and extract whatever
components are needed.
One word of warning - Verilog does not enforce port directionality (e.g. it is
perfectly legal to connect two output ports together), so you would need the
backend to perform electrical rule checking.
Stephen Williams wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> I encountered the same issue with the "pcb" code generator,
> which is intended to do exactly what you are trying to do,
> but target PCB instead of Kicad. My conclusion at the time
> was it was best to make an empty module to act as a place-
> holder. This is handy anyhow as a place to attach default
> attributes such as footprint information.
>
> On 03/13/2014 04:17 PM, Cotton Seed wrote:
>> Is there a mechanism in iverlog to elaborate a design that
>> instantiates an undefined/external module? Obviously, I don't
>> intend to simulate it. I'm potentially interested in using verilog
>> rather than schematic capture to do PCB design. There would need
>> to be a library of discrete components, but I'm not sure how to
>> declare such a thing in verilog. (I'm still relatively new to
>> verilog. My apologies if my question is naive.) A backend would
>> convert the iverlog netlist to a netlist for something like Kicad.
>>
>> Best, Cotton
>
>
>
> - --
> Steve Williams "The woods are lovely, dark and deep.
> steve at icarus.com But I have promises to keep,
> http://www.icarus.com and lines to code before I sleep,
> http://www.picturel.com And lines to code before I sleep."
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlMk94gACgkQrPt1Sc2b3ims7QCffBsfLV7yePC+ZLft6V4WuPn5
> f/EAoJG8tsgl/q1KktI4hyiSv09evqdW
> =56oG
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Iverilog-devel mailing list
> Ive...@li...
> https://lists.sourceforge.net/lists/listinfo/iverilog-devel
>
|