cube1us / IBM1410SMS

Database Program for capturing data from IBM SMS Automated Logic Diagrams and related database layer
GNU General Public License v3.0
0 stars 0 forks source link

DOT Functions with +B Logic Levels are AND #61

Closed cube1us closed 4 years ago

cube1us commented 4 years ago

The current default for the electrical (generated HDL) function of a DOT function (where the outputs of two gates are tied togehter) is OR. However, with +B logic levels, that use NPN transistors the levels are +6 and 0V, so an "on" transistor pulls the signal to 0V - logic 0 - which means that the DOT function is actually an AND. I recently added the ability to "force" a logic function to "AND" (or anything else, for that matter), however a better solution might be to add a column to the logic levels table indicating how a DOT function connecting that level should work (and punting with an error if there are multiple levels feeding a DOT function unless the ForcedLogicFunction is set for that DOT Function. This would also allow for a report indicating where things were amiss.

cube1us commented 4 years ago

Resolved. Added dotFunctionLogic column to database logicLevels table. Changed HDL generation to inspect signal levels of edge signals and gates that provide inputs to the dot function and the the signal levels of logic blocks and edge signals that originate with the DOT function. If those are consistent, then the logicLevels table is consulted to find the appropriate logic function. If they are inconsistent, or if the particular logic level has no dotFunctionLogic entry, the dotFunction will generate as an "OR". The override on the EditDotFunction dialog still takes precedence, and the other special cases for things like -C levels and switches remain - but the two newer capabilities of detecting logic levels and the forced override make them superfluous, and with a little sheet editing (to set forced logic functions) and logic levels editing that code could be removed.