By default Active-HDL follows a fixed directory structure where all of the design files such as schematic files, text files, waveform and scripts are saved in one folder called /src. Active-HDL also allow designers to apply a user-defined design structure. This means users can define their own directory structure to store their design files – after defining the design structure, newly created files, files added from outside to the design or HDL files generated from schematics and FSM are stored automatically into the user-defined directory structure. For example, all of the HDL files will be stored in an /hdl folder, schematics files will be stored in an /hds, waveform files will be stored in a /wave folder and so on – the path where these folders are created and names of the folders are defined by user. If the user does not define any directory structure, Active-HDL by default will use the fixed structure and store all of the files in the /src folder.
User-defined design management gives flexibility to designers in creating and maintaining FPGA projects across the team located locally or remote. It also allows them to:
Easily maintain and adhere to design structure required by entire team or a company
Separate HDL files from other types of files, e.g. schematics, text, waveform and scripts
Automatically store design files based on their types and/or extension
Separate library sources from other design files
Create directory structure that is compatible to other synthesis and implementation tools tool – thus maintaining common design structure during the entire FPGA development
By default, Active-HDL applies a fixed directory structure which stores all of the design files in the /src folder as shown in Figure 1 below, and all of the HDL files generated from schematics and FSM are stored in the /compile folder. Default design structure can be accessed from Tools | Preferences | Design Structure.
Figure 1 Default Directory Structure
To create user-defined design structure:
Double click on the “Folder or Path” column for individual file types.
Define the path in this field where you would like to save your files as shown in Figure 2 below.
Please note that if the folder does not exist on that path, Active-HDL will create the folder and store the files in them. The locations specified in this category should always be relative to the design directory pointed by the $dsn predefined variable. This variable points to the directory of the current design. This variable is a Read-only variable.
Figure 2 User-defined Directory Structure
Let’s take a closer look at each individual setting above in Figure 2 to learn how user-defined directory structure works.
Settings in Figure 3 below will store your block diagram files to the $dsn/schematics directory. For example if your design directory is C:/My_Designs/fifo then BDE file will be stored into C:/My_Designs/fifo/schematics
Figure 3 Creating Directory
Settings in Figure 4 below will create vhdl folder at two directory up from $dsn and store files into it. For example VHDL source files will be stored into vhdl folder of ‘C’ drive (C:/vhdl).
Figure 4 Creating Directories with Path - Example 1
Settings in Figure 5 will create verilog folder into $dsn/src directory. For example Verilog source files will be stored into C:/My_designs/fifo/src/verilog.
Figure 5 Creating Directories with Path - Example 2
If the option in Figure 6 below is selected, auto generated files from block diagrams and state machine diagrams will be stored into the directory specified by VHDL Source Code and Verilog Source Code categories, depending upon your target language for code generation. If this option is unchecked, then the auto generated files from the block diagrams and state machine diagrams will be stored in the $dsn\compile folder.
Figure 6 Manage Generated HDL Files from Schematics
After the directory structure settings are applied, the following files will be automatically maintained according to the new structure. Every time a user performs the following actions, files are stored in the defined directory.
New source files prepared from scratch or created by using the New source File Wizard
New files added to a design (as local copy)
Source files generated by the Block or State Diagram Editor and the Code2Graphics Conversion Wizard
Files of third-party projects imported to Active-HDL
In order to update the structure of the design that were created using 9.1 or previous versions of Active-HDL pass the –convertstructure argument to ‘design’ or ‘workspace’ commands when opening a design. See example below,
design open –convertstructure <design_path>
Once the directory structure has been converted, it cannot be restored to its previous state.
Note: Simply opening a design created using 9.1 or previous version of Active-HDL from GUI will not apply user-defined structure automatically.
Note: Files with links to design (of older Active-HDL versions) will not be converted to newly defined structure. You will have to manually add those files.
By default, the preferences for the design folders are saved to the design_structure.cfg configuration file stored in the $aldec\Dat directory, $aldec points to the Active-HDL installation directory.
design_structure.cfg file can be edited and shared. It can be copied to a local directory or to a network resource (e.g. Server)
Figure 7 below shows the contents of the design_structure.cfg file. You can edit the right hand side in the file and provide your path. This path should be relative to the $dsn variable.
Figure 7 Contents of design_structure.cfg file
design_structure.cfg file can be copied onto a network resource e.g server. Team members then can load this file into their Active-HDL copy to follow the same design structure defined in design_structure.cfg. To load the settings to a local Active-HDL copy, use the importdesignstructure command in the console with the configuration file as an argument. See example below, $networkloc points to the network location of the design_structure.cfg file.