Emit error if field that is asynchronously reset uses a dynamic reset value. #129
This commit is contained in:
@@ -76,3 +76,16 @@ class TestValidationErrors(BaseTestCase):
|
||||
"multiple_unconditional_assigns.rdl",
|
||||
"Field has multiple conflicting properties that unconditionally set its state",
|
||||
)
|
||||
|
||||
def test_unsynth_reset1(self) -> None:
|
||||
self.assert_validate_error(
|
||||
"unsynth_reset1.rdl",
|
||||
"A field that uses an asynchronous reset cannot use a dynamic reset value. This is not synthesizable.",
|
||||
)
|
||||
|
||||
def test_unsynth_reset2(self) -> None:
|
||||
self.default_reset_async = True
|
||||
self.assert_validate_error(
|
||||
"unsynth_reset2.rdl",
|
||||
"A field that uses an asynchronous reset cannot use a dynamic reset value. This is not synthesizable.",
|
||||
)
|
||||
|
||||
19
tests/test_validation_errors/unsynth_reset1.rdl
Normal file
19
tests/test_validation_errors/unsynth_reset1.rdl
Normal file
@@ -0,0 +1,19 @@
|
||||
signal {
|
||||
field_reset;
|
||||
async;
|
||||
activehigh;
|
||||
} foo;
|
||||
|
||||
addrmap top {
|
||||
reg {
|
||||
field {
|
||||
sw=rw; hw=na;
|
||||
} f1;
|
||||
|
||||
field {
|
||||
sw=rw; hw=na;
|
||||
} f2;
|
||||
|
||||
f1->reset = f2;
|
||||
} x;
|
||||
};
|
||||
13
tests/test_validation_errors/unsynth_reset2.rdl
Normal file
13
tests/test_validation_errors/unsynth_reset2.rdl
Normal file
@@ -0,0 +1,13 @@
|
||||
addrmap top {
|
||||
reg {
|
||||
field {
|
||||
sw=rw; hw=na;
|
||||
} f1;
|
||||
|
||||
field {
|
||||
sw=rw; hw=na;
|
||||
} f2;
|
||||
|
||||
f1->reset = f2;
|
||||
} x;
|
||||
};
|
||||
Reference in New Issue
Block a user