← Back to Pull requests

fix: draw the 74158 internal logic diagram #3222

Open
Vadimatorik opened this pull request with 137 lines diff across 2 files
View on GitHub
Vadimatorik Vadimatorik commented on Nov 19, 2026 06:28 UTC
Author

Grok 4.7

This pull request was prepared by Grok 4.7.

Summary

Draws the internal logic diagram of the existing TTL 74158. propagateTtl is unchanged.

  • Four sections share select and an active-low strobe. Each block takes A, B, select and strobe on the left and drives the inverted Y toward its output pin.
  • Related to https://github.com/logisim-evolution/logisim-evolution/issues/3164

    Merging this pull request leaves issue 3164 open. That issue tracks the whole TTL drawing effort, and this change is only the 74158.

    NO_TICKET

    Test plan

  • Place a 74158 with pin 1 at the lower left, turn on Show internal structure, and compare the diagram with the datasheet

  • Confirm the simulation is unchanged: this pull request does not edit propagateTtl
  • Made with Cursor

    Diff: 137 lines (+135 / -2) across 2 files Reviewer: maehne Review duration: 22454m
    All Vouch review confidence checks passed
    Residual risk 0.04 = Change Risk (0.39) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 137 lines diff across 2 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 2 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    89%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.295
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    4 items
    Vadimatorik Vadimatorik commented on Nov 19, 2026 06:28 UTC
    Author
    maehne maehne requested changes on Nov 23, 2026 10:02 UTC
    Changes Requested Reviewer

    Thanks for proposing an internal logic diagram for TTL 74158! After a quick look to the data sheet and comparing it to the diagram, my concern is mostly that the selection and enable control inputs cannot be clearly distinguished from the A and B data inputs. Especially, their position varies between the top and bottom multiplexers. I would recommend to adopt the symbol of Logisim's Multiplexer component with "Include Enable?" set to Yes and and adding the low-active circles as necessary. What do you think?

    Vadimatorik Vadimatorik commented on Nov 27, 2026 21:43 UTC
    Author

    This pull request is paused until we decide whether TTL internal diagrams should be drawn through one shared class. That question is #3237.

    @maehne suggested factoring the drawing helpers into a common class in the review of #3220: https://github.com/logisim-evolution/logisim-evolution/pull/3220#pullrequestreview-6036461837

    This pull request draws the internal diagram without that class. I will not continue it until the library question is settled. The pull request stays open.

    Reviewers
    Assignees
    Vadimatorik Vadimatorik
    Labels
    risk: low confidence: 89.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 89.1% · Lower = rushed or shallow review
    89.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 4.2% · Safe to merge
    4.2%