Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filelist Management and Auto-generation #1

Open
3 tasks done
xfguo opened this issue Jul 21, 2020 · 2 comments
Open
3 tasks done

Filelist Management and Auto-generation #1

xfguo opened this issue Jul 21, 2020 · 2 comments

Comments

@xfguo
Copy link
Member

xfguo commented Jul 21, 2020

Checklist

  • Did you write out a description of the feature you want to see?
  • Did you look around for any related features?
  • Did you specify relevant external information?

Request a feature? Please fill out the sections below. 👍

Feature Description

project.yml should always be created when we run scratchip create PROJ, the project.yml should include everything for re-init the project. Also, a version should be specified to make it's easy to upgrade to new version.

# contents of project.yml
version: 0.2.1
filelist:
  rtl:
    - include 
    - rtl/verilog/ethmac.v
    - rtl/verilog/eth_clkgen.v
  sim:
    - inlucde: rtl
  syn:
    - include: rtl
  fpga:
    - include: rtl
  1. support include other filelist
  2. scratchip command to generate filelist with arguments, scratchip filelist
  3. support include/include_dir
  4. all filelist should be in pre-defined order

Type of Feature

Related Features

Additional context

Impact: unknown

Development Phase: proposal

@colin4124
Copy link
Member

colin4124 commented Jul 21, 2020

Configure

project.yml

filelist:
   rtl:
     defines:
       - FOO: 59
       - BAR
     files:
       - rtl/verilog/defines.v : is_include_file
       - rtl/verilog/subdir : is_include_dir
       - rtl/verilog/ethmac.v
       - rtl/verilog/eth_crc.v
     includes:
       - cpu.yml
       - an.yml
   sim:
     filesets: [rtl]
     files:
       - rtl/verilog/sim_defines.v : is_include_file
       - rtl/verilog/sim_rtl.v
   fpga:
     filesets: [sim]
     files:
       - rtl/verilog/fpga_defines.v : is_include_file
       - rtl/verilog/fpga.v

cpu.yml

defines:
  - CORES: 59
  - CACHE
files:
  - rtl/cpu/defines.v : is_include_file
  - rtl/cpu/subdir : is_include_dir
  - rtl/cpu/core.v

an.yml

defines:
  - AN_DELAY: 24
  - MDIO
files:
  - rtl/an/defines.v : is_include_file
  - rtl/an/subdir : is_include_dir
  - rtl/an/an.v

rtl, sim and fpga are targets. In a target, files is a list of path of verilog file; includes is other yaml filelist. filesets include other targets.

includes 's YAML should contain defines or files or both fields, such as:

defines:
  - CORES: 59
  - CACHE
files:
  - rtl/cpu/defines.v : is_include_file
  - rtl/cpu/subdir : is_include_dir
  - rtl/cpu/core.v

Usage

scratchip filelist would use default path 'PROJECT_ROOT/project.yml' to generate all tagets's filelist:

  • builds/filelist/rtl.f
  • builds/filelist/sim.f
  • builds/filelist/fpga.f

scratchip filelist path/to/your/project_cfg.yml -t [target] would generate [target] 's filelist only. such as: scratchip filelist myproject.yml -t rtl

All filelist woulde be in pre-defined order.

@xfguo
Copy link
Member Author

xfguo commented Jul 21, 2020

I think the filelist file included should not be ".f", should be another yml.

colin4124 pushed a commit that referenced this issue Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants