遇到[0]:使用Not实现Not16时,可能无法使用内部节点的子总线

Posted

技术标签:

【中文标题】遇到[0]:使用Not实现Not16时,可能无法使用内部节点的子总线【英文标题】:Encounter [0]: sub bus of an internal node may not be used when implementing Not16 with Not 【发布时间】:2021-11-20 14:12:06 【问题描述】:

当我使用 Not 实现 Not16 时:

CHIP Not16 
    IN in[16];
    OUT out[16];
  
    PARTS:
        Not(in=[0], out=out[0]);
        Not(in=[1], out=out[1]);
        Not(in=[2], out=out[2]);
        Not(in=[3], out=out[3]);
        // ...
        Not(in=[15], out=out[15]);

我在第一部分收到错误“[0]:可能无法使用内部节点的子总线”。

但是,使用 16 个 Nand 门来实现这一点很好:

Nand(a=in[0], b=in[0], out=out[0]);
// ...

有人可以指出问题和区别。

附言使用HardwareSimulator from Nand2Tetris

【问题讨论】:

【参考方案1】:

我相信您的 Not 组件中有拼写错误。 in 应该是 in=in[x] 的形式,而不是你目前使用的 in=[x]。

相反,您的 Nand 组件格式正确。

【讨论】:

【参考方案2】:

你的格式是正确的,但是试试 in = in[0] 而不是 in = [0]

【讨论】:

以上是关于遇到[0]:使用Not实现Not16时,可能无法使用内部节点的子总线的主要内容,如果未能解决你的问题,请参考以下文章

windows 下 pyinstaller distutils not included with latest virtualenv (16.4.0)

kotlin.NotImplementedError: An operation is not implemented: not implemented AlertDialog

使用 .htaccess 时如何使 mod_rewrite *not* 执行主目录扩展

使用 Must 和 Must not 的 Elasticsearch 查询

selenium.common.exceptions.ElementNotVisibleException: Message: element not visible处理方法:selenium针对下拉

Oracle 10g 10.2.0.4的group by BUG |ORA-00979 not a GROUP BY expression|