您当前的位置: 首页 > 

FPGA硅农

暂无认证

  • 2浏览

    0关注

    282博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

【数字IC/FPGA】检测最后一个匹配序列的位置

FPGA硅农 发布时间:2022-06-26 10:48:35 ,浏览量:2

题目描述

编写一个模块,输入一个64比特的比特流,识别匹配出101101的最后的位置,并输出位置信息。

代码
`timescale 1ns / 1ps
//
// Company: 
// Engineer: 
// 
// Create Date: 2022/06/21 10:34:41
// Design Name: 
// Module Name: top
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//


module top(
input logic clk,
input logic rst,
input logic valid,
input logic din,
output logic done,
output logic [5:0] pos
);
//101101
logic [5:0] shift_reg;
logic [5:0] cnt;
//cnt
always@(posedge clk,posedge rst)
if(rst)
   cnt            
关注
打赏
1658642721
查看更多评论
0.0377s