Skip to content

Commit e30b8ac

Browse files
committed
Add fusesoc:utils:generators 0.1.1
1 parent bf2d15c commit e30b8ac

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

fusesoc_utils/generators.core

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
CAPI=2:
2+
3+
name : fusesoc:utils:generators:0.1
4+
5+
generators:
6+
custom:
7+
interpreter: python
8+
command: custom.py
9+
description : Run custom command
10+
usage: |
11+
The custom generator allows the user to specify a custom command to run.
12+
As the custom generator doesn't know by itself what is produced by the
13+
command, the user is requrested to specify any created files and associated
14+
plusargs, defines etc in the output configuration parameter.
15+
16+
Parameters:
17+
command (str): The command to run. Working directory for the command is
18+
determined by the copy_core and run_from_core parameters
19+
copy_core (bool): Copy the working directory to a temporary location and run
20+
the command from there
21+
run_from_core (bool): Runs command from the directory specified as files_root
22+
in the configuration file
23+
output (dict): A dictionary describing the expected output from the command.
24+
These are written to the generated .core file
25+
files (list): A list of files, specified in the same format as CAPI2 fileset
26+
files, which are expected to be generated by the command
27+
parameters (dict): A map of parameters, specified in the same format as
28+
CAPI2 parameters, which are used by the generated files
29+
30+
gitversion:
31+
interpreter: python
32+
command: gitversion.py
33+
description: Parse version tags from git repo
34+
usage: |
35+
The gitversion generator runs git describe to look at the tags in the current
36+
directory (or in files_root if that is defined in the input configuration file)
37+
and creates verilog defines that can be used in a core to provide accurate
38+
version information.
39+
40+
Tags are assumed to be on the format vx.y.z which produces the following defines
41+
VERSION_MAJOR = x
42+
VERSION_MINOR = y
43+
VERSION_PATCH = z
44+
45+
In addition to the parsed tags, the gitversion generator will also set
46+
VERSION_REV to the number of commits since the last tag and VERSION_DIRTY if
47+
it detects that there are local modifications in the repository
48+
49+
provider:
50+
name : github
51+
user : fusesoc
52+
repo : fusesoc-generators
53+
version : v0.1.1
54+

0 commit comments

Comments
 (0)