Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
H
Hdlmake
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 12
    • Issues 12
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • Wiki
    • Wiki
  • image/svg+xml
    Discourse
    • Discourse
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Projects
  • Hdlmake
  • Issues
  • #96

Closed
Open
Opened Jun 03, 2019 by Nicolas Chevillot@chevillotn
  • Report abuse
  • New issue
Report abuse New issue

DISCUSSION: Find the best way to support 'attirbutes' kind for modules or files

In LATOME project, hdl-make has been enhanced with the possibility to add attributes to files or modules in Manifests. The following attributes are added:

  • action: uses the module/file only if the action matches
  • dependencies: add fixed dependencies to a file, in order for example to compile Intel Quartus files (220model.v/20pack.vhd/altera_mf.v...) in the proper order as some of those files are encrypted and cannot therefore be checked with the VHDL/Verilog parser
  • enable: uses the module/file only if the condition is True
  • library: overrides the default library for the file. Useful for example to compile Intel Quartus files as they must be compiled in various libraries such that 1 Manifest only is used instead of 1 per library
  • preprocess: used to preprocess the file, either replace an environment variable by its content (to have generic code) or calls C-preprocessor to use #if #else #endif constructs
  • relations: to generate relation files locally to the Manifest for example if a module is common to many others and does not change like intel Quartus EDA files
  • vcom_opt: allows to add a specific VHDL compiler option to the file

Example Manifest.py extracted from LATOME project:

# List of modules
modules = {
    'local': [
        'user_src',
        '$REPOSITORY_ROOT_PATH/PoC',
        '$REPOSITORY_ROOT_PATH/LATOME/src/ipctrl/src/ipctrl_util',
        {'$REPOSITORY_ROOT_PATH/LATOME/src/pattern_generator': {'enable': 'PATTERN_GENERATOR_INTERNAL_ENABLE'}},
    ],
}

# Default library
library = 'istage'

# List of source files
files = [
    {'istage_arch.vhd': {'preprocess': 'cpp'}},
    'istage_comp.vhd',
    'istage_ent.vhd',
]

This implementation is a choice. Other implementations can be made. Let's discuss on the best way to implement it.

Edited Jun 03, 2019 by Nicolas Chevillot
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
1
Labels
feature
Assign labels
  • View project labels
Reference: project/hdl-make#96