Skip to content

Commit da2d774

Browse files
committed
change randsequence in syntax and indent
1 parent 93e1de8 commit da2d774

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

indent/systemverilog.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ function s:GetSVBlockStart(keyword, curr_lnum, mode)
9797
elseif a:keyword =~ '\<endgroup\>'
9898
let pend = '\<endgroup\>'
9999
let pstart = '\<covergroup\>'
100+
elseif a:keyword =~ '\<endsequence\>'
101+
let pend = '\<endsequence\>'
102+
let pstart = '\<randsequence\>'
100103
elseif a:keyword =~ '`else'
101104
let pend = '`else'
102105
let pstart = '`if\%[n]def'
@@ -155,7 +158,7 @@ function GetSystemVerilogIndent()
155158
" Define the condition when the statement ends with a one-line comment
156159
let sv_comment = '\%(\/\/.*\|\/\*.*\*\/\s*\)'
157160
let sv_block1_statement = '\%(`\@<!\<\%(if\|else\)\>\)\|' .
158-
\ '\%(^\s*\<\%(for\|case\%[zx]\|do\|foreach\|randcase' .
161+
\ '\%(^\s*\<\%(for\|case\%[zx]\|do\|foreach\|randcase\|randsequence' .
159162
\ '\|initial\|forever\|fork\|final\|specify' .
160163
\ '\|always\|always_comb\|always_ff\|always_latch\)\>\)'
161164
let sv_block2_statement = '^\s*\%(' .

syntax/systemverilog.vim

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ syn keyword svStatement break return continue fork join disable force release
2828
syn keyword svStatement join_any join_none frokjoin binsof intersect
2929

3030
syn keyword svLabel bind constraint covergroup coverpoint
31-
syn keyword svLabel class CLOCK clocking default function interface modport
31+
syn keyword svLabel class CLOCK clocking default function interface modport
3232
syn keyword svLabel package program property randseq sequence specify
33-
syn keyword svLabel task
34-
syn keyword svLabel begin initial module forever import randsequence
35-
syn keyword svLabel end endclass endfunction endtask endprogram endmodule
36-
syn keyword svLabel endinterface endpackage endproperty endsequence endclocking endgroup
33+
syn keyword svLabel task
34+
syn keyword svLabel begin initial module forever import
35+
syn keyword svLabel end endclass endfunction endtask endprogram endmodule
36+
syn keyword svLabel endinterface endpackage endproperty endclocking endgroup
3737

3838
syn keyword svConditional if iff else case casex casez endcase randcase
39-
syn keyword svConditional unique priority
39+
syn keyword svConditional unique priority randsequence endsequence
4040
syn keyword svRepeat repeat while for do foreach
4141
syn keyword svModifier after all any around assoc_size async
4242
syn keyword svModifier before big_endian bit_normal bit_reverse export
@@ -66,7 +66,7 @@ syn keyword svType logic int mailbox input output inout unsigned time wire
6666
"syn keyword svTask semaphore_get semaphore_put setstate signal_connect
6767
"syn keyword svTask sprintf srandom sscanf stop suspend_thread sync
6868
"syn keyword svTask trace trigger unit_delay unlock_file urand48
69-
"syn keyword svTask urandom urandom_range
69+
"syn keyword svTask urandom urandom_range
7070
"syn keyword svTask vsv_call_func vsv_call_task vsv_get_conn_err
7171
"syn keyword svTask vsv_make_client vsv_make_server vsv_up_connections
7272
"syn keyword svTask vsv_wait_for_done vsv_wait_for_input wait_child wait_var
@@ -88,7 +88,7 @@ syn keyword svOperator or inside dist not
8888
syn keyword svMethods atobin atohex atoi atooct backref bittostr capacity
8989
syn keyword svMethods compare Configure constraint_mode DisableTrigger
9090
syn keyword svMethods DoAction empty EnableCount EnableTrigger Event find
91-
syn keyword svMethods find_index find_first find_first_index find_last find_last_index
91+
syn keyword svMethods find_index find_first find_first_index find_last find_last_index
9292
syn keyword svMethods GetAssert get_at_least get_auto_bin getc GetCount get_coverage_goal get_cov_weight
9393
syn keyword svMethods get_cross_bin_max GetFirstAssert GetName GetNextAssert
9494
syn keyword svMethods get_status get_status_msg hide hash icompare insert
@@ -105,7 +105,7 @@ syn keyword svMethods pre_boundary prematch pre_pack pre_pack pre_randomize
105105
syn keyword svMethods pre-randomize pre_unpack product push_back push_front putc query
106106
syn keyword svMethods query_str rand_mode randomize reserve reverse rsort search
107107
syn keyword svMethods set_at_least set_auto_bin_max set_bin_activiation
108-
syn keyword svMethods set_coverage_goal set_cov_weight set_cross_bin_max
108+
syn keyword svMethods set_coverage_goal set_cov_weight set_cross_bin_max
109109
syn keyword svMethods size sort substr sum thismatch tolower toupper unique_index
110110
syn keyword svMethods Wait
111111
syn keyword svMethods num delete exists first last next prev
@@ -239,8 +239,8 @@ syn keyword svConstant PAST_IT PERCENT POSEDGE PROGRAM RAWIN REGION REPORT
239239
syn keyword svConstant SAMPLE SAVE SEMAPHORE SET SILENT STATE stderr
240240
syn keyword svConstant stdin stdout STR STR_ERR_OUT_OF_RANGE
241241
syn keyword svConstant STR_ERR_REGEXP_SYNTAX SUM TRANS VERBOSE void WAIT
242-
syn keyword svConstant __LINE__ __FILE__ __DATE__ __TIME__
243-
syn keyword svConstant __VERSION__
242+
syn keyword svConstant __LINE__ __FILE__ __DATE__ __TIME__
243+
syn keyword svConstant __VERSION__
244244

245245
syn match svUserConstant "\<[A-Z][A-Z0-9_]\+\>"
246246
syn match svUvmMacro "`uvm_\w\+"

0 commit comments

Comments
 (0)