diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-08-11 00:40:45 +0200 |
---|---|---|
committer | umarcor <unai.martinezcorral@ehu.eus> | 2021-08-23 16:35:34 +0200 |
commit | 92c3b2d6cf5835e0aa048a12dcc1e80b36990a4b (patch) | |
tree | 4bd0431e785b306f2f249a66e188998288f607b8 /pyGHDL/dom | |
parent | c5411e01a4ca454e8ffbe0a1d92b7bfd2c7d2217 (diff) | |
download | ghdl-92c3b2d6cf5835e0aa048a12dcc1e80b36990a4b.tar.gz ghdl-92c3b2d6cf5835e0aa048a12dcc1e80b36990a4b.tar.bz2 ghdl-92c3b2d6cf5835e0aa048a12dcc1e80b36990a4b.zip |
Handle assignments (target and kind).
Diffstat (limited to 'pyGHDL/dom')
-rw-r--r-- | pyGHDL/dom/Concurrent.py | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pyGHDL/dom/Concurrent.py b/pyGHDL/dom/Concurrent.py index 4e4240dbf..990fc32c7 100644 --- a/pyGHDL/dom/Concurrent.py +++ b/pyGHDL/dom/Concurrent.py @@ -46,6 +46,7 @@ from pyVHDLModel.SyntaxModel import ( IfGenerateStatement as VHDLModel_IfGenerateStatement, CaseGenerateStatement as VHDLModel_CaseGenerateStatement, ForGenerateStatement as VHDLModel_ForGenerateStatement, + WaveformElement as VHDLModel_WaveformElement, ConcurrentSimpleSignalAssignment as VHDLModel_ConcurrentSimpleSignalAssignment, Name, ConcurrentStatement, @@ -380,17 +381,30 @@ class ForGenerateStatement(VHDLModel_ForGenerateStatement, DOMMixin): @export +class WaveformElement( + VHDLModel_WaveformElement, DOMMixin +): + def __init__( + self, + waveformNode: Iir, + expression: Expression, + after: Expression + ): + super().__init__(expression, after) + DOMMixin.__init__(self, waveformNode) + +@export class ConcurrentSimpleSignalAssignment( VHDLModel_ConcurrentSimpleSignalAssignment, DOMMixin ): def __init__( self, assignmentNode: Iir, + label: str, target: Name, - expression: Expression, - label: str = None, + waveform: Iterable[WaveformElement], ): - super().__init__(target, expression, label) + super().__init__(label, target, waveform) DOMMixin.__init__(self, assignmentNode) @classmethod @@ -405,6 +419,6 @@ class ConcurrentSimpleSignalAssignment( waveform = nodes.Get_Waveform_Chain(assignmentNode) # TODO: translate waveforms to series of "expressions". - expression = None + expression = [None] - return cls(assignmentNode, targetName, expression, label) + return cls(assignmentNode, label, targetName, expression) |