首页 > 其他分享 >3-input LUT

3-input LUT

时间:2024-04-11 17:12:55浏览次数:18  
标签:enable LUT shift should circuit input

In this question, you will design a circuit for an 8x1 memory, where writing to the memory is accomplished by shifting-in bits, and reading is "random access", as in a typical RAM. You will then use the circuit to realize a 3-input logic function.

First, create an 8-bit shift register with 8 D-type flip-flops. Label the flip-flop outputs from Q[0]...Q[7]. The shift register input should be called S, which feeds the input of Q[0] (MSB is shifted in first). The enable input controls whether to shift. Then, extend the circuit to have 3 additional inputs A,B,C and an output Z. The circuit's behaviour should be as follows: when ABC is 000, Z=Q[0], when ABC is 001, Z=Q[1], and so on. Your circuit should contain ONLY the 8-bit shift register, and multiplexers. (Aside: this circuit is called a 3-input look-up-table (LUT)).

题目网站

module top_module (
    input clk,
    input enable,
    input S,
    input A, B, C,
    output Z ); 
	reg [7:0] Q;
    always @(posedge clk)begin
        if(enable)begin
            Q <= {Q[6:0],S};
        end
        else begin
            Q <= Q;
        end
    end
    
    assign Z = Q[{A,B,C}];
endmodule

标签:enable,LUT,shift,should,circuit,input
From: https://www.cnblogs.com/jzzg/p/18129632

相关文章

  • 输入流和字符串互转InputStream2String和String2InputStream
    输入流转字符串12345678910111213141516171819public static StringInputStream2String(InputStreamin){    InputStreamReaderreader= null;    try {        reader= new InputStreamReader(in, "UTF-8");   ......
  • Flutter实战 -- fl_chart(条形图)
    1-引入依赖fl_chart:^0.35.0#折线图2-条形图具体实现条形图代码:import'package:fl_chart/fl_chart.dart';import'package:flutter/material.dart';classMyHomePageextendsStatefulWidget{constMyHomePage({super.key,requiredthis.title});fina......
  • CF1748E Yet Another Array Counting Problem の Solution
    Link有些人还是啥都不会。看到题目应该能想到这是笛卡尔树的性质,因为每一对\((l,r)\)都满足最左端最大值位置相同,所以说明在笛卡尔树上,每一对点的lca相同,说明\(a\)和\(b\)序列的笛卡尔树相同。我们以下标为键,\(a_i\)为值建立大根笛卡尔树,现在题目就转换成在这个树上填......
  • 使用Pluto SDR发送单音信号(Matlab)
    RTL-SDR电视棒应该有不少人都玩过,几十块钱就可以接收到很宽频段的信号,不仅可以收听广播,还可以监听某些电台,甚至可以接收GPS信号进行定位,但它作为无线电设备的痛点就是只能收但不能发,不能自己发送信号,是不是有点手痒痒,如果恰巧手里有一块可以同时收发信号的PlutoSDR,那么玩法......
  • 木犀草素 (Luteoline) 是一种类黄酮化合物 | MedChemExpress (MCE)
    Luteolin|木犀草素Luteolin|木犀草素中文名:木犀草素CAS:491-70-3品牌:MedChemExpress(MCE)存储条件:Powder:-20°C,3years;4°C,2years.Insolvent:-80°C,6months;-20°C,1month.生物活性:木犀草素(Luteoline)是一种类黄酮化合物,是一种有效的Nrf2抑制剂......
  • 空洞卷积 Dilated Convolution
    空洞卷积DilatedConvolution通常的卷积操作,除了需要指定输入输出通道数,还需要确定卷积核大小kernei_size、步长stride、填充大小padding。Conv1d(384,48,kernel_size=3,stride=1,padding=1)空洞卷积则是在此基础上增加了dilation参数,用于控制卷积核的扩张程度。dil......
  • 鸿蒙HarmonyOS实战-ArkUI组件(TextInput/TextArea)
    ......
  • 关于layui的单图片上传遇坑-field-input-name问题解决
    直接上代码注意field:'ymftimage'layui.use(function(){varupload=layui.upload;varlayer=layui.layer;varelement=layui.element;var$=layui.$;//单图片上传varuploadInst=upload.render({elem:'#ID-upload-demo-btn',......
  • Vue input密码输入框自定义密码眼睛icon
    我们用的饿了么UI组件库里,密码输入框的icon是固定不变的,如下所示:点击"眼睛"这个icon不变,现在需求是UI给的设计稿里,密码输入框的"眼睛"有如下两种:代码如下:<el-input:key="passwordType"ref="password"......
  • Randomness Is All You Need: Semantic Traversal of Problem-Solution Spaces with L
    本文是LLM系列文章,针对《RandomnessIsAllYouNeed:SemanticTraversalofProblem-SolutionSpaceswithLargeLanguageModels》的翻译。随机性就是你所需要的:具有大型语言模型的问题解决空间的语义遍历摘要1引言2相关工作3模型4算法5评估6实现7结论摘......