跳到主要内容

東京大学 情報理工学系研究科 コンピュータ科学専攻 2017年8月実施 専門科目I 問題3

Author

祭音Myyura (co-authored with GPT 5.6 SOL)

Description

In this problem, we construct SRAM with 2-bit address width and 4-bit data width. All symbols for inputs and outputs represent 1-bit signals taking values of 0 or 1. We use memory cells with the following specifications. A memory cell has inputs II, WW, and SS and an output OO, and stores a 1-bit value. At a falling edge of WW, the value of II is stored in the memory cell. While SS is 1, the stored value is output to OO, and otherwise 0 is output to OO. In your circuit designs, you can use AND, OR, NOT and XOR gates in addition to the specified ones.

Answer the following questions.

(1) Design a 2-bit decoder. It should have inputs A0A_0 and A1A_1, and outputs B0B_0, B1B_1, B2B_2, and B3B_3. BiB_i (i=0,1,2,3i=0,1,2,3) outputs 1 if i=A0+2A1i=A_0+2A_1, and outputs 0 otherwise.

(2) Let VijV_{ij} be the memory cell for the jj-th bit of data stored in address ii (i,j=0,1,2,3i,j=0,1,2,3). Design a circuit to read the stored data, assuming that values are already stored in the memory cells. The circuit has inputs A0A_0 and A1A_1, and outputs V0V_0, V1V_1, V2V_2, and V3V_3. If A0+2A1=iA_0+2A_1=i, then the value stored at VijV_{ij} is output as VjV_j (j=0,1,2,3j=0,1,2,3). You can use the decoder designed in question (1).

(3) Add the functionality of storing data to the circuit designed in question (2). Inputs WMW_M, U0U_0, U1U_1, U2U_2 and U3U_3 should be added. At a falling edge of WMW_M, the value of UjU_j is stored in the memory cell VijV_{ij} (j=0,1,2,3j=0,1,2,3) for A0+2A1=iA_0+2A_1=i. In this case, the other memory cells keep the stored values. Assume that the values of A0A_0 and A1A_1 are kept unchanged while WMW_M is 1. You may answer only the differences from your answer to question (2).

题目描述

设计地址宽度为 22 bit、数据宽度为 44 bit 的 SRAM。所有输入输出均为取值 0011 的单比特信号。存储单元具有输入 I,W,SI,W,S 和输出 OOWW 的下降沿把 II 写入单元;S=1S=1 时从 OO 输出所存位,否则输出 00。除存储单元外可用 AND、OR、NOT、XOR 门。

(1)设计 2-to-4 译码器。输入为 A0,A1A_0,A_1,输出为 B0,,B3B_0,\ldots,B_3,当且仅当 i=A0+2A1i=A_0+2A_1Bi=1B_i=1

(2)令 VijV_{ij} 为地址 ii 中第 jj 位的存储单元(i,j=0,1,2,3i,j=0,1,2,3)。假设数据已经写入,设计读电路:若 i=A0+2A1i=A_0+2A_1,则输出 VjV_j 应为 VijV_{ij} 中存储的值。

(3)在(2)的电路上增加写功能。新增输入 WM,U0,,U3W_M,U_0,\ldots,U_3;在 WMW_M 的下降沿,将 UjU_j 写入当前地址的 VijV_{ij},其余单元保持原值。假设 WM=1W_M=1 期间 A0,A1A_0,A_1 保持不变。可只画出相对(2)新增或修改的部分。

Kai

(1)

B0=A1A0,B1=A1A0,B2=A1A0,B3=A1A0.\begin{aligned} B_0&=\overline{A_1}\,\overline{A_0},& B_1&=\overline{A_1}A_0,\\ B_2&=A_1\overline{A_0},& B_3&=A_1A_0. \end{aligned}

任意输入下恰有一个 BiB_i11

(2)

把同一行四个单元的选择端均接到该行译码输出:

Sij=Bi,Vj=O0jO1jO2jO3j.S_{ij}=B_i,\qquad V_j=O_{0j}\lor O_{1j}\lor O_{2j}\lor O_{3j}.

因为未选中行的单元输出全为 00,按位 OR 后正好得到被选中行的数据。

(3)

对每个 VijV_{ij} 增加如下连接:

Iij=Uj,Wij=WMBi,Sij=Bi.I_{ij}=U_j,\qquad W_{ij}=W_M\land B_i,\qquad S_{ij}=B_i.

题设保证写入期间地址不变,因此选中行的 WijW_{ij}WMW_M 产生下降沿并写入 UjU_j;未选中行始终有 Wij=0W_{ij}=0,不会产生写入下降沿。