diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-02 18:56:05 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-02 18:56:10 +0200 |
commit | 7cef548049a386a6afaa0ad825318ab4833b0446 (patch) | |
tree | ff388f636e80082d94262df9cba5c7c758d5a9d6 /src/synth/synth-environment.adb | |
parent | b3aec78254d4048f61693a88a3d25d1f5d8ccd25 (diff) | |
download | ghdl-7cef548049a386a6afaa0ad825318ab4833b0446.tar.gz ghdl-7cef548049a386a6afaa0ad825318ab4833b0446.tar.bz2 ghdl-7cef548049a386a6afaa0ad825318ab4833b0446.zip |
synth-environment: allow multiple assignments from instance ports
Diffstat (limited to 'src/synth/synth-environment.adb')
-rw-r--r-- | src/synth/synth-environment.adb | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb index f050265c3..18133594e 100644 --- a/src/synth/synth-environment.adb +++ b/src/synth/synth-environment.adb @@ -658,9 +658,22 @@ package body Synth.Environment is return True; end Is_Finalize_Assignment_Multiport; - function Is_Tribuf_Assignment (Prev, Next : Conc_Assign) return Boolean + function Is_Tribuf_Net (N : Net) return Boolean is use Netlists.Gates; + begin + case Get_Id (Get_Net_Parent (N)) is + when Id_Tri + | Id_Resolver + | Id_Port => + return True; + when others => + return False; + end case; + end Is_Tribuf_Net; + + function Is_Tribuf_Assignment (Prev, Next : Conc_Assign) return Boolean + is P_Val : Net; N_Val : Net; begin @@ -675,22 +688,8 @@ package body Synth.Environment is end if; -- Both assignments must be a tri or a resolver. - case Get_Id (Get_Net_Parent (P_Val)) is - when Id_Tri - | Id_Resolver => - null; - when others => - return False; - end case; - case Get_Id (Get_Net_Parent (N_Val)) is - when Id_Tri - | Id_Resolver => - null; - when others => - return False; - end case; - - return True; + return Is_Tribuf_Net (P_Val) + and then Is_Tribuf_Net (N_Val); end Is_Tribuf_Assignment; -- Compute the VALUE to be assigned to WIRE_REC. Handle partial |