@@ -73,13 +73,19 @@ def yosys_vhdl_synth(ctx):
73
73
cmd .add (yosys_gen )
74
74
cmd .add ("--input" , in_json_file )
75
75
cmd .add ("--output" , yosys_py .as_output ())
76
+
76
77
77
78
ctx .actions .run (cmd , category = "yosys_synth_gen" )
78
79
80
+ yosys_synth_log = ctx .actions .declare_output ("synth.log" )
81
+ yosys_ghdl_warns = ctx .actions .declare_output ("ghdl_stderr.log" )
79
82
yosys_synth_cmd = cmd_args (hidden = [in_json_file , maps ])
80
83
yosys_synth_cmd .add (ctx .attrs ._python [PythonToolchainInfo ].interpreter )
81
84
yosys_synth_cmd .add (yosys_py )
82
85
yosys_synth_cmd .add ("--output" , yosys_json .as_output ())
86
+ yosys_synth_cmd .add ("--log" , yosys_synth_log .as_output ())
87
+ yosys_synth_cmd .add ("--ghdl_stderr" , yosys_ghdl_warns .as_output ())
88
+
83
89
84
90
ctx .actions .run (yosys_synth_cmd , category = "yosys_run" )
85
91
providers .append (DefaultInfo (default_output = yosys_json ))
@@ -92,13 +98,15 @@ def ice40_nextpnr(ctx, yoys_providers):
92
98
yosys_json = yoys_providers [0 ].default_outputs [0 ]
93
99
94
100
asc = ctx .actions .declare_output ("{}.asc" .format (ctx .attrs .name ))
101
+ next_pnr_log = ctx .actions .declare_output ("nextpnr.log" )
95
102
cmd = cmd_args ()
96
103
cmd .add (ctx .attrs ._nextpnr_ice40 [RunInfo ])
97
104
cmd .add (next_pnr_family_flags (ctx .attrs .family ))
98
105
cmd .add ("--package" , ctx .attrs .package )
99
106
cmd .add ("--pcf" , ctx .attrs .pinmap )
100
107
cmd .add ("--json" , yosys_json )
101
108
cmd .add ("--asc" , asc .as_output ())
109
+ cmd .add ("--log" , next_pnr_log .as_output ())
102
110
103
111
ctx .actions .run (cmd , category = "next_pnr" )
104
112
0 commit comments