Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
scratch:namespace [2020/05/11 09:32] – created prafull | scratch:namespace [2020/12/02 06:00] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Creating a library of building blocks ====== | ====== Creating a library of building blocks ====== | ||
- | A library can be created using pre-designed building blocks and use them in hierarchical designs. This can be achieved using keyword | + | A library can be created using pre-designed building blocks and use them in hierarchical designs. This can be achieved using keyword |
ACT files can be imported in two ways: | ACT files can be imported in two ways: | ||
- | (a) For simple projects, design files containing building blocks can be imported using keyword | + | (a) For simple projects, design files containing building blocks can be imported using keyword |
< | < | ||
Line 34: | Line 34: | ||
</ | </ | ||
- | This file can be imported in a new ACT file "xor2.act" | + | This file can be imported in a new ACT file '' |
< | < | ||
Line 52: | Line 52: | ||
(b) For complex projects involving a large number of ACT files, importing libraries can become complicated. For example, a project can have multiple ACT files containing different implementation of a design with same process name or different channels with same name. To keep names of process, channel, and types separate in such cases, ACT provides the option of namespace ([[language: | (b) For complex projects involving a large number of ACT files, importing libraries can become complicated. For example, a project can have multiple ACT files containing different implementation of a design with same process name or different channels with same name. To keep names of process, channel, and types separate in such cases, ACT provides the option of namespace ([[language: | ||
- | The following example creates a namespace gates in file gates.act and defines process for basic logic gates within the namespace. | + | The following example creates a namespace gates in file '' |
< | < | ||
Line 87: | Line 87: | ||
</ | </ | ||
- | As shown below, this library is imported in a new ACT file "adder.act" | + | As shown below, this library is imported in a new ACT file '' |
< | < | ||
Line 112: | Line 112: | ||
</ | </ | ||
- | where adder.scr file contains following commands: | + | You could also run '' |
+ | |||
+ | < | ||
+ | prsim adder.act | ||
+ | (Prsim) source adder.scr | ||
+ | </ | ||
+ | |||
+ | where '' | ||
< | < | ||
Line 137: | Line 144: | ||
get fa.co | get fa.co | ||
</ | </ | ||
+ | |||
+ |