Skip to content

Commit 5e2d09d

Browse files
committed
SVA: type for named sequences and properties
This introduces a type for named sequences and properties, similar to the type for functions and tasks.
1 parent c5ef5a1 commit 5e2d09d

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

src/hw_cbmc_irep_ids.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ IREP_ID_ONE(verilog_always)
228228
IREP_ID_ONE(verilog_always_comb)
229229
IREP_ID_ONE(verilog_always_ff)
230230
IREP_ID_ONE(verilog_always_latch)
231+
IREP_ID_ONE(verilog_sva_named_property)
232+
IREP_ID_ONE(verilog_sva_named_sequence)
231233
IREP_ID_ONE(named_port_connection)
232234
IREP_ID_ONE(verilog_final)
233235
IREP_ID_ONE(initial)

src/verilog/verilog_typecheck.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,6 +1805,8 @@ void verilog_typecheckt::convert_property_declaration(
18051805
convert_sva(declaration.cond());
18061806
require_sva_property(declaration.cond());
18071807

1808+
declaration.type() = verilog_sva_named_property_typet{};
1809+
18081810
auto type = verilog_sva_property_typet{};
18091811
symbolt symbol{full_identifier, type, mode};
18101812

@@ -1840,6 +1842,8 @@ void verilog_typecheckt::convert_sequence_declaration(
18401842
convert_sva(sequence);
18411843
require_sva_sequence(sequence);
18421844

1845+
declaration.type() = verilog_sva_named_sequence_typet{};
1846+
18431847
symbolt symbol{full_identifier, sequence.type(), mode};
18441848

18451849
symbol.module = module_identifier;

src/verilog/verilog_types.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,4 +867,28 @@ class verilog_sva_sequence_typet : public typet
867867
}
868868
};
869869

870+
/// SVA named properties
871+
class verilog_sva_named_property_typet
872+
: public typet
873+
{
874+
public:
875+
explicit verilog_sva_named_property_typet()
876+
: typet{
877+
ID_verilog_sva_named_property}
878+
{
879+
}
880+
};
881+
882+
/// SVA named sequences
883+
class verilog_sva_named_sequence_typet
884+
: public typet
885+
{
886+
public:
887+
explicit verilog_sva_named_sequence_typet()
888+
: typet{
889+
ID_verilog_sva_named_sequence}
890+
{
891+
}
892+
};
893+
870894
#endif

0 commit comments

Comments
 (0)