Skip to content

Commit f494926

Browse files
authored
Merge pull request #1441 from diffblue/verilog_sva_named_sequence_property_typet
SVA: type for named sequences and properties
2 parents 4bc8124 + ab97931 commit f494926

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-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.property());
18061806
require_sva_property(declaration.property());
18071807

1808+
declaration.type() = verilog_sva_named_property_typet{};
1809+
18081810
// The symbol uses the full declaration as value
18091811
auto type = verilog_sva_property_typet{};
18101812
symbolt symbol{full_identifier, type, mode};
@@ -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
// The symbol uses the full declaration as value
18441848
symbolt symbol{full_identifier, sequence.type(), mode};
18451849

src/verilog/verilog_types.h

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

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

0 commit comments

Comments
 (0)