Skip to content

Restore missing 'ld' pin for RAM in Separate Ports mode#47

Open
KEDIT2007 wants to merge 1 commit into
Logisim-Ita:masterfrom
KEDIT2007:fix-ram-ld-pin
Open

Restore missing 'ld' pin for RAM in Separate Ports mode#47
KEDIT2007 wants to merge 1 commit into
Logisim-Ita:masterfrom
KEDIT2007:fix-ram-ld-pin

Conversation

@KEDIT2007

Copy link
Copy Markdown

Related Issue
Fixes #46

Description of Changes
This PR restores the ld (load) pin on the RAM component when the "Data Interface" attribute is set to "Separate load and store ports".

In version 2.16.1.4 (during the introduction of "Simplified Mode"), the logic to initialize and draw the OE (Output Enable) pin in Ram.java was moved inside a conditional block that only executes if ports are NOT separate (if (!separate)).

However, in "Separate Ports" mode, the OE pin is semantically required to function as the ld trigger. This PR moves the OE pin initialization outside of that conditional block so that it is available in both "One synchronous load/store port" and "Separate load and store ports" modes.

This commit fixes a regression introduced in version 2.16.1.4 where the
'ld' (load) pin would disappear when the RAM component was configured
with "Separate load and store ports."

The issue was caused by moving the OE (Output Enable) pin initialization 
inside an 'if (!separate)' conditional block in Ram.java. While OE 
serves as a tri-state enable in combined mode, it is required as the 
dedicated 'ld' trigger when ports are separated. 

Moving the pin instantiation outside of the conditional block ensures 
that the pin is correctly drawn and evaluated in both data interface 
modes, restoring the intended behavior of the component.

Fixes Logisim-Ita#46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ld pin missing in RAM "Separate load and store ports" mode (Regression since 2.16.1.4)

1 participant