mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 12:28:44 +00:00
verilog: improve specify support when not in -specify mode
This commit is contained in:
parent
2e51dc1856
commit
6b58c1820c
|
@ -1043,7 +1043,7 @@ list_of_specparam_assignments:
|
||||||
specparam_assignment | list_of_specparam_assignments ',' specparam_assignment;
|
specparam_assignment | list_of_specparam_assignments ',' specparam_assignment;
|
||||||
|
|
||||||
specparam_assignment:
|
specparam_assignment:
|
||||||
ignspec_id '=' constant_mintypmax_expression ;
|
ignspec_id '=' ignspec_expr ;
|
||||||
|
|
||||||
ignspec_opt_cond:
|
ignspec_opt_cond:
|
||||||
TOK_IF '(' ignspec_expr ')' | /* empty */;
|
TOK_IF '(' ignspec_expr ')' | /* empty */;
|
||||||
|
@ -1060,13 +1060,15 @@ simple_path_declaration :
|
||||||
;
|
;
|
||||||
|
|
||||||
path_delay_value :
|
path_delay_value :
|
||||||
'(' path_delay_expression list_of_path_delay_extra_expressions ')'
|
'(' ignspec_expr list_of_path_delay_extra_expressions ')'
|
||||||
| path_delay_expression
|
| ignspec_expr
|
||||||
| path_delay_expression list_of_path_delay_extra_expressions
|
| ignspec_expr list_of_path_delay_extra_expressions
|
||||||
;
|
;
|
||||||
|
|
||||||
list_of_path_delay_extra_expressions :
|
list_of_path_delay_extra_expressions :
|
||||||
',' path_delay_expression | ',' path_delay_expression list_of_path_delay_extra_expressions;
|
',' ignspec_expr
|
||||||
|
| ',' ignspec_expr list_of_path_delay_extra_expressions
|
||||||
|
;
|
||||||
|
|
||||||
specify_edge_identifier :
|
specify_edge_identifier :
|
||||||
TOK_POSEDGE | TOK_NEGEDGE ;
|
TOK_POSEDGE | TOK_NEGEDGE ;
|
||||||
|
@ -1120,14 +1122,6 @@ system_timing_args :
|
||||||
system_timing_args TOK_IGNORED_SPECIFY_AND system_timing_arg |
|
system_timing_args TOK_IGNORED_SPECIFY_AND system_timing_arg |
|
||||||
system_timing_args ',' system_timing_arg ;
|
system_timing_args ',' system_timing_arg ;
|
||||||
|
|
||||||
path_delay_expression :
|
|
||||||
ignspec_constant_expression;
|
|
||||||
|
|
||||||
constant_mintypmax_expression :
|
|
||||||
ignspec_constant_expression
|
|
||||||
| ignspec_constant_expression ':' ignspec_constant_expression ':' ignspec_constant_expression
|
|
||||||
;
|
|
||||||
|
|
||||||
// for the time being this is OK, but we may write our own expr here.
|
// for the time being this is OK, but we may write our own expr here.
|
||||||
// as I'm not sure it is legal to use a full expr here (probably not)
|
// as I'm not sure it is legal to use a full expr here (probably not)
|
||||||
// On the other hand, other rules requiring constant expressions also use 'expr'
|
// On the other hand, other rules requiring constant expressions also use 'expr'
|
||||||
|
|
|
@ -7,11 +7,9 @@ module test (
|
||||||
if (EN) Q <= D;
|
if (EN) Q <= D;
|
||||||
|
|
||||||
specify
|
specify
|
||||||
`ifndef SKIP_UNSUPPORTED_IGN_PARSER_CONSTRUCTS
|
|
||||||
if (EN) (posedge CLK *> (Q : D)) = (1, 2:3:4);
|
if (EN) (posedge CLK *> (Q : D)) = (1, 2:3:4);
|
||||||
$setup(D, posedge CLK &&& EN, 5);
|
$setup(D, posedge CLK &&& EN, 5);
|
||||||
$hold(posedge CLK, D &&& EN, 6);
|
$hold(posedge CLK, D &&& EN, 6);
|
||||||
`endif
|
|
||||||
endspecify
|
endspecify
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
|
|
@ -55,4 +55,4 @@ equiv_induct -seq 5
|
||||||
equiv_status -assert
|
equiv_status -assert
|
||||||
design -reset
|
design -reset
|
||||||
|
|
||||||
read_verilog -DSKIP_UNSUPPORTED_IGN_PARSER_CONSTRUCTS specify.v
|
read_verilog specify.v
|
||||||
|
|
Loading…
Reference in a new issue