基于QC-LDPC编码的循环移位网络的FPGA实现

news2024/12/25 23:58:16

一、桶式移位寄存器(barrel shifter) 

        八位桶式移位寄存器的VHDL实现如下,由于每一层结构相似,于是采用生成语句for_generate实现,使用该代码实现的RTL级分析和理论的结构一致,仿真结果也符合预期。 

entity barrel_shift is
  GENERIC(DATA_WIDTH:   INTEGER:=8;
          CTRL_WIDTH:   INTEGER:=3);
  Port (DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        CTRL:       IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        DATA_OUT:   OUT STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0)
        );
end barrel_shift;

architecture Behavioral of barrel_shift is
SIGNAL LAYER_1_TEMP:    STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
SIGNAL LAYER_2_TEMP:    STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
SIGNAL LAYER_3_TEMP:    STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
begin
    LAYER_1:FOR I IN 0 TO 7 GENERATE
        G1:IF I<=3 GENERATE
            LAYER_1_TEMP(I)<=DATA_IN(I)WHEN CTRL(2)='0'ELSE DATA_IN(I+4);
        END GENERATE G1;
        G2:IF I>3 GENERATE                                              
            LAYER_1_TEMP(I)<=DATA_IN(I)WHEN CTRL(2)='0'ELSE DATA_IN(I-4);
        END GENERATE G2;                                                 
    END GENERATE LAYER_1;
    
    LAYER_2:FOR I IN 0 TO 7 GENERATE
        G3:IF I<=5 GENERATE
            LAYER_2_TEMP(I)<=LAYER_1_TEMP(I)WHEN CTRL(1)='0'ELSE LAYER_1_TEMP(I+2);
        END GENERATE G3;
        G4:IF I>5 GENERATE                                              
            LAYER_2_TEMP(I)<=LAYER_1_TEMP(I)WHEN CTRL(1)='0'ELSE LAYER_1_TEMP(I-6);
        END GENERATE G4;                                                 
    END GENERATE LAYER_2;
    
    LAYER_3:FOR I IN 0 TO 7 GENERATE
        G5:IF I<=6 GENERATE
            LAYER_3_TEMP(I)<=LAYER_2_TEMP(I)WHEN CTRL(0)='0'ELSE LAYER_2_TEMP(I+1);
        END GENERATE G5;
        G6:IF I>6 GENERATE                                              
            LAYER_3_TEMP(I)<=LAYER_2_TEMP(I)WHEN CTRL(0)='0'ELSE LAYER_2_TEMP(I-7);
        END GENERATE G6;                               
    END GENERATE LAYER_3;    
    
    DATA_OUT<=LAYER_3_TEMP;
    
end Behavioral;

二、QSN网络

 2.1LSN网络

        该网络的VHDL代码和RTL分析如下 

entity LSN_9x8_network is
  GENERIC(DATA_WIDTH:   INTEGER:=9;
          CTRL_WIDTH:   INTEGER:=4);
  Port (DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        LSN_CTRL:   IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        DATA_OUT:   OUT STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0)
        );
end LSN_9x8_network;

architecture Behavioral of LSN_9x8_network is
SIGNAL LAYER_1_TEMP:    STD_LOGIC_VECTOR(DATA_WIDTH-9 DOWNTO 0);
SIGNAL LAYER_2_TEMP:    STD_LOGIC_VECTOR(DATA_WIDTH-5 DOWNTO 0);
SIGNAL LAYER_3_TEMP:    STD_LOGIC_VECTOR(DATA_WIDTH-3 DOWNTO 0);
SIGNAL LAYER_4_TEMP:    STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
begin
    LAYER_1:FOR I IN 0 TO 0 GENERATE
        G1:IF I=0 GENERATE
            LAYER_1_TEMP(I)<=DATA_IN(I)WHEN LSN_CTRL(3)='0'ELSE DATA_IN(I+8);
        END GENERATE G1;                                       
    END GENERATE LAYER_1;
    
    LAYER_2:FOR I IN 0 TO 4 GENERATE--5
        G2:IF I=0 GENERATE
            LAYER_2_TEMP(I)<=LAYER_1_TEMP(I)WHEN LSN_CTRL(2)='0'ELSE DATA_IN(I+4);
        END GENERATE G2; 
        G3:IF I>0 GENERATE
            LAYER_2_TEMP(I)<=DATA_IN(I)     WHEN LSN_CTRL(2)='0'ELSE DATA_IN(I+4);
        END GENERATE G3;                                               
    END GENERATE LAYER_2;
    
    LAYER_3:FOR I IN 0 TO 6 GENERATE--7
        G4:IF I<=2 GENERATE
            LAYER_3_TEMP(I)<=LAYER_2_TEMP(I)WHEN LSN_CTRL(1)='0'ELSE LAYER_2_TEMP(I+2);
        END GENERATE G4; 
        G5:IF I>2 AND I<=4 GENERATE
            LAYER_3_TEMP(I)<=LAYER_2_TEMP(I)WHEN LSN_CTRL(1)='0'ELSE DATA_IN(I+2);
        END GENERATE G5;
        G6:IF I>4 GENERATE
            LAYER_3_TEMP(I)<=DATA_IN(I)     WHEN LSN_CTRL(0)='0'ELSE DATA_IN(I+2);
        END GENERATE G6;                 
    END GENERATE LAYER_3;    
    
    LAYER_4:FOR I IN 0 TO 7 GENERATE---8
        G7:IF I<=5 GENERATE
            LAYER_4_TEMP(I)<=LAYER_3_TEMP(I)WHEN LSN_CTRL(0)='0'ELSE LAYER_3_TEMP(I+1);
        END GENERATE G7; 
        G8:IF I=6 GENERATE
            LAYER_4_TEMP(I)<=LAYER_3_TEMP(I)WHEN LSN_CTRL(0)='0'ELSE DATA_IN(I+1);
        END GENERATE G8;
        G9:IF I>6 GENERATE
            LAYER_4_TEMP(I)<=DATA_IN(I)     WHEN LSN_CTRL(0)='0'ELSE DATA_IN(I+1);
        END GENERATE G9;                         
    END GENERATE LAYER_4; 
    
    DATA_OUT<=LAYER_4_TEMP(DATA_WIDTH-2 DOWNTO 0);
    
end Behavioral;

 2.2RSN网络 

 9x9的右移网络的VHDL实现和RTL分析如下

entity RSN_9x9_network is
  GENERIC(DATA_WIDTH:   INTEGER:=9;
          CTRL_WIDTH:   INTEGER:=4);
  Port (DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        RSN_CTRL:   IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        DATA_OUT:   OUT STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0)
        );
end RSN_9x9_network;

architecture Behavioral of RSN_9x9_network is
    COMPONENT LSN_9x8_network IS
       GENERIC(DATA_WIDTH:   INTEGER:=9;
               CTRL_WIDTH:   INTEGER:=4);
        Port (
        DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        LSN_CTRL:   IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        DATA_OUT:   OUT STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0)
        );
    END COMPONENT;
begin
   LSN_9X8:LSN_9x8_network
    GENERIC MAP(
    DATA_WIDTH  =>  DATA_WIDTH,
    CTRL_WIDTH  =>  CTRL_WIDTH
    )
    PORT MAP(   
    DATA_IN(0)  =>  DATA_IN(8),
    DATA_IN(1)  =>  DATA_IN(7),
    DATA_IN(2)  =>  DATA_IN(6),
    DATA_IN(3)  =>  DATA_IN(5),
    DATA_IN(4)  =>  DATA_IN(4),
    DATA_IN(5)  =>  DATA_IN(3),
    DATA_IN(6)  =>  DATA_IN(2),
    DATA_IN(7)  =>  DATA_IN(1), 
    DATA_IN(8)  =>  DATA_IN(0),   
    LSN_CTRL    =>  RSN_CTRL,
    DATA_OUT(0) =>  DATA_OUT(8),
    DATA_OUT(1) =>  DATA_OUT(7),
    DATA_OUT(2) =>  DATA_OUT(6),
    DATA_OUT(3) =>  DATA_OUT(5),
    DATA_OUT(4) =>  DATA_OUT(4),
    DATA_OUT(5) =>  DATA_OUT(3),
    DATA_OUT(6) =>  DATA_OUT(2),
    DATA_OUT(7) =>  DATA_OUT(1)
    );              
    DATA_OUT(0) <=  DATA_IN(0);
end Behavioral;

  2.3MN网络

entity MN_9x9_network is
  GENERIC(DATA_WIDTH:   INTEGER:=9);
  Port (LSN_DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
        RSN_DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        M_CTRL:         IN  STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
        DATA_OUT:       OUT STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0)
        );
end MN_9x9_network;

architecture Behavioral of MN_9x9_network is
begin
    G1:FOR I IN 0 TO DATA_WIDTH-2 GENERATE
        DATA_OUT(I)<=RSN_DATA_IN(I) WHEN M_CTRL(I)='0' ELSE LSN_DATA_IN(I);
    END GENERATE G1;
    DATA_OUT(8)<='0' WHEN FALSE ELSE RSN_DATA_IN(8);
end Behavioral;

 2.4控制模块 

 控制模块的VHDL实现和仿真波形图如下

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity CTRL is
  GENERIC(DATA_WIDTH:   INTEGER:=9;
          CTRL_WIDTH:   INTEGER:=4);
  Port (CLK:        IN  STD_LOGIC;
        RST_N:      IN  STD_LOGIC;
        EN:         IN  STD_LOGIC;
        SHIFT_NUM:  IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        M:          OUT STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
        LSN_SHIFT:  OUT STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        RSN_SHIFT:  OUT STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0); 
        VALID:      OUT STD_LOGIC  
        );
end CTRL;

architecture Behavioral of CTRL is

begin
    LSN_SHIFT_GE:PROCESS(CLK,RST_N)
    BEGIN
        IF RST_N='0'THEN
            LSN_SHIFT<=(OTHERS=>'0');
        ELSIF RISING_EDGE(CLK) THEN
            IF EN='1'THEN
                LSN_SHIFT<=SHIFT_NUM;
            END IF;
        END IF;
    END PROCESS;
    
    RSN_SHIFT_GE:PROCESS(CLK,RST_N)
    BEGIN
        IF RST_N='0'THEN
            RSN_SHIFT<=(OTHERS=>'0');
        ELSIF RISING_EDGE(CLK) THEN
            IF EN='1'THEN
                RSN_SHIFT<=9-SHIFT_NUM;
            END IF;
        END IF;
    END PROCESS;
    
    M_GE:PROCESS(CLK,RST_N)
    BEGIN
        IF RST_N='0'THEN
            M<=(OTHERS=>'0');
        ELSIF RISING_EDGE(CLK) THEN
            IF EN='1'THEN
                IF SHIFT_NUM>=9 THEN M(0)<='0';ELSE M(0)<='1';END IF;
                IF SHIFT_NUM>=8 THEN M(1)<='0';ELSE M(1)<='1';END IF;
                IF SHIFT_NUM>=7 THEN M(2)<='0';ELSE M(2)<='1';END IF;
                IF SHIFT_NUM>=6 THEN M(3)<='0';ELSE M(3)<='1';END IF;
                IF SHIFT_NUM>=5 THEN M(4)<='0';ELSE M(4)<='1';END IF;
                IF SHIFT_NUM>=4 THEN M(5)<='0';ELSE M(5)<='1';END IF;
                IF SHIFT_NUM>=3 THEN M(6)<='0';ELSE M(6)<='1';END IF;
                IF SHIFT_NUM>=2 THEN M(7)<='0';ELSE M(7)<='1';END IF;
            END IF;
        END IF;
    END PROCESS;
    
    VALID_GE:PROCESS(CLK,RST_N)
    BEGIN
        IF RST_N='0'THEN                 
            VALID<='0';            
        ELSIF RISING_EDGE(CLK) THEN      
            IF EN='1'THEN
                VALID<='1';       
            ELSE
                VALID<='0';       
            END IF;
        END IF;
    END PROCESS;
end Behavioral;

  2.5顶层

        顶层的作用是将子模块例化,VHDL实现和RTL分析如下

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity QSN_9x9_network is
  GENERIC(DATA_WIDTH:   INTEGER:=9;
          CTRL_WIDTH:   INTEGER:=4);
  Port (CLK:        IN  STD_LOGIC;
        RST_N:      IN  STD_LOGIC;
        EN:         IN  STD_LOGIC;
        SHIFT_NUM:  IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        DATA_OUT:   OUT STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        VALID:      OUT STD_LOGIC
        );
end QSN_9x9_network;

architecture Behavioral of QSN_9x9_network is
    COMPONENT LSN_9x8_network IS
       GENERIC(DATA_WIDTH:   INTEGER:=9;
               CTRL_WIDTH:   INTEGER:=4);
        Port (
        DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        LSN_CTRL:   IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        DATA_OUT:   OUT STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0)
        );
    END COMPONENT;
    
    COMPONENT RSN_9x9_network IS
       GENERIC(DATA_WIDTH:   INTEGER:=9;
               CTRL_WIDTH:   INTEGER:=4);
        Port (
        DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        RSN_CTRL:   IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        DATA_OUT:   OUT STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0)
        );
    END COMPONENT;
    
    COMPONENT MN_9x9_network IS
       GENERIC(DATA_WIDTH:   INTEGER:=9);
        Port (
        LSN_DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
        RSN_DATA_IN:    IN  STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
        M_CTRL:         IN  STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
        DATA_OUT:       OUT STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0)
        );
    END COMPONENT;
    
    COMPONENT CTRL IS
        GENERIC(DATA_WIDTH:   INTEGER:=9;
                CTRL_WIDTH:   INTEGER:=4);
        Port (
        CLK:        IN  STD_LOGIC;
        RST_N:      IN  STD_LOGIC;
        EN:         IN  STD_LOGIC;
        SHIFT_NUM:  IN  STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        M:          OUT STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
        LSN_SHIFT:  OUT STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
        RSN_SHIFT:  OUT STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0); 
        VALID:      OUT STD_LOGIC  
        );
    END COMPONENT;
--CTRL
SIGNAL M_CTRL:      STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
SIGNAL LSN_SHIFT:   STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
SIGNAL RSN_SHIFT:   STD_LOGIC_VECTOR(CTRL_WIDTH-1 DOWNTO 0);
SIGNAL CTRL_EN:     STD_LOGIC;
--LSN
SIGNAL LSN_OUT:     STD_LOGIC_VECTOR(DATA_WIDTH-2 DOWNTO 0);
--RSN
SIGNAL RSN_OUT:     STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
--MN_OUT
SIGNAL OUT_REG:     STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
SIGNAL DATA_OUT_REG:STD_LOGIC_VECTOR(DATA_WIDTH-1 DOWNTO 0);
--VALID_REG
SIGNAL VALID_REG:   STD_LOGIC;
begin
    CTRL_GE:CTRL
    GENERIC MAP(
    DATA_WIDTH =>   DATA_WIDTH,
    CTRL_WIDTH =>   CTRL_WIDTH
    )
    PORT MAP(
    CLK        =>   CLK,
    RST_N      =>   RST_N,
    EN         =>   EN,
    SHIFT_NUM  =>   SHIFT_NUM,
    M          =>   M_CTRL,
    LSN_SHIFT  =>   LSN_SHIFT,
    RSN_SHIFT  =>   RSN_SHIFT,
    VALID      =>   CTRL_EN
    );
    
    LSN:LSN_9x8_network
    GENERIC MAP(
    DATA_WIDTH =>   DATA_WIDTH,
    CTRL_WIDTH =>   CTRL_WIDTH
    )
    PORT MAP(
    DATA_IN    =>   DATA_IN,  
    LSN_CTRL   =>   LSN_SHIFT,
    DATA_OUT   =>   LSN_OUT
    );
    
    RSN:RSN_9x9_network
    GENERIC MAP(
    DATA_WIDTH =>   DATA_WIDTH,
    CTRL_WIDTH =>   CTRL_WIDTH
    )
    PORT MAP(
    DATA_IN    =>   DATA_IN,  
    RSN_CTRL   =>   RSN_SHIFT,
    DATA_OUT   =>   RSN_OUT
    );
    
    MN:MN_9x9_network
    GENERIC MAP(
    DATA_WIDTH =>   DATA_WIDTH
    )
    PORT MAP(  
    LSN_DATA_IN=>   LSN_OUT,
    RSN_DATA_IN=>   RSN_OUT,
    M_CTRL     =>   M_CTRL,
    DATA_OUT   =>   OUT_REG
    );
    
    OUT_GE:PROCESS(CLK,RST_N)
    BEGIN
        IF RST_N='0'THEN
            DATA_OUT_REG<=(OTHERS=>'0');
        ELSIF RISING_EDGE(CLK)THEN
            IF CTRL_EN='1'THEN
                DATA_OUT_REG<=OUT_REG;
            END IF;
        END IF;
    END PROCESS;
    
    DATA_OUT<=DATA_OUT_REG;
    
    VALID_REG_GE:PROCESS(CLK,RST_N)
    BEGIN
        IF RST_N='0'THEN
            VALID_REG<='0';
        ELSIF RISING_EDGE(CLK)THEN
            IF CTRL_EN='1'THEN
                VALID_REG<='1';
            ELSE
                VALID_REG<='0';
            END IF;
        END IF;
    END PROCESS;
    
    VALID<=VALID_REG;

end Behavioral;

        使用时钟CLK和复位信号RST_N控制时序,并加入输入输出使能信号。最后实现的结果如下,可以看到左循环移位1~9的结果均正确。 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1415894.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

降低文件增长和失真的零系数JPEG图像可逆信息隐藏

一、研究概述和意义 随着多媒体技术和网络的迅猛发展&#xff0c;数字媒体的应用越来越广泛。在网络上传输的数字 媒体如音频、文本、视频和图像的内容及数据安全问题也随之而来。伴随着计算机技术发展与普及&#xff0c;数字媒体的机密性、完整性经常受到非法活动的威胁&…

OJ_完数和盈数

题干 c实现 #include<stdio.h> #include<vector> using namespace std;int IsWanOrYing(int a) {int sum 1;for (int i 2; i < a; i) {if (a % i 0) {sum i;}}if (sum a) {return 1;}else if (sum > a) {return 2;}return -1; }int main() {vector<…

DjangoURL调度器(二)

一、默认值与额外参数 1.1、默认值 1.1.1、urls.py from django.urls import pathfrom . import viewsurlpatterns [# http://127.0.0.1:8000/polls/blog/ 等同于 # http://127.0.0.1:8000/polls/blog/1/path(blog/, views.page),# http://127.0.0.1:8000/polls/blo…

【鸿蒙】大模型对话应用(二):对话界面设计与实现

Demo介绍 本demo对接阿里云和百度的大模型API&#xff0c;实现一个简单的对话应用。 DecEco Studio版本&#xff1a;DevEco Studio 3.1.1 Release HarmonyOS SDK版本&#xff1a;API9 关键点&#xff1a;ArkTS、ArkUI、UIAbility、网络http请求、列表布局、层叠布局 对话页…

Java笔记 --- 一、双列集合

一、双列集合 双列集合的特点 Map 创建Map对象时&#xff0c;要规定键和值的泛型 Map是一个接口&#xff0c;不能直接创建&#xff0c;要创建实例化对象 Map的遍历 通过键找值 先获取到键的对象&#xff0c;并放到一个单列集合中&#xff08;map.KeySet()方法&#xff09;…

如何预防服务器IP被劫持,危害有什么?

服务器IP被劫持是一种严重的网络安全问题&#xff0c;攻击者通过篡改服务器的IP地址&#xff0c;将网络流量重定向到恶意服务器或网站&#xff0c;导致用户无法正常访问目标服务器&#xff0c;并可能面临数据泄露、恶意软件感染等安全风险。了解服务器IP被劫持的危害和预防措施…

【数据结构与算法】6.栈

&#x1f4da;博客主页&#xff1a;爱敲代码的小杨. ✨专栏&#xff1a;《Java SE语法》 ❤️感谢大家点赞&#x1f44d;&#x1f3fb;收藏⭐评论✍&#x1f3fb;&#xff0c;您的三连就是我持续更新的动力❤️ &#x1f64f;小杨水平有限&#xff0c;欢迎各位大佬指点&…

python 基础知识点(蓝桥杯python科目个人复习计划25)

今日复习内容&#xff1a;基础算法中的进制转换 1.任意进制转十进制 &#xff08;1&#xff09; 基数&#xff1a;表示奇数数字符号的个数 10进制&#xff1a;0--9&#xff0c;基数为1016进制&#xff1a;0--9&#xff0c;A--F&#xff0c;基数为16 &#xff08;2&#xff…

146基于matlab的齿轮非线性动力学

基于matlab的齿轮非线性动力学&#xff0c;绘出系统状态变量随参数变化分岔图&#xff0c;绘图参数对应的系统各周期及混沌状态的时间历程图、相轨迹图、Poincare映射图&#xff0c;程序已调通&#xff0c;可直接运行。 146 matlab 齿轮非线性动力学 相图 (xiaohongshu.com)

第2章-神经网络的数学基础——python深度学习

第2章 神经网络的数学基础 2.1 初识神经网络 我们来看一个具体的神经网络示例&#xff0c;使用 Python 的 Keras 库 来学习手写数字分类。 我们这里要解决的问题是&#xff0c; 将手写数字的灰度图像&#xff08;28 像素28 像素&#xff09;划分到 10 个类别 中&#xff08;0…

Unity读书系列《Unity3D游戏开发》——拓展编辑器(一)

文章目录 前言一、扩展Project视图1、右键扩展菜单&#xff08;Asset&#xff09;2、监听事件3、拓展布局 二、扩展Hierarchy视图1、拓展菜单&#xff08;GameObject&#xff09;2、拓展布局3、重写菜单 三、扩展Inspector视图1、扩展原生组件2、扩展继承组件 四、扩展Scene视图…

【多线程】ThreadLocal 作为类的私有静态字段实践

ThreadLocal 通常作为类的私有静态字段存在的主要原因是为了确保每个线程都能够拥有自己独立的 ThreadLocal 变量。 以下是一些原因&#xff1a; 线程隔离&#xff1a; ThreadLocal 的设计目的是为了实现线程隔离&#xff0c;即每个线程都可以独立地管理自己的变量&#xff0c…

华为机考入门python3--(3)牛客3-明明的随机数

分类&#xff1a;集合、排序 知识点&#xff1a; 集合添加元素 set.add(element) 集合转列表 list(set) 列表排序 list.sort() 题目来自【牛客】 N int(input().strip()) nums set()for i in range(N):nums.add(int(input().strip()))# 集合转列表 nums_list l…

3 JS类型 值和变量

计算机对value进行操作。 value有不同的类型。每种语言都有其自身的类型集合。编程语言的类型集是该编程语言的基本特性。 value需要保存一个变量中。 变量的工作机制是变成语言的另一个基本特性。 3.1概述和定义 JS类型分为&#xff1a; 原始类型和对象类型。 原始类型&am…

最高20倍!压缩ChatGPT等模型文本提示,极大节省AI算力

最高20倍&#xff01;压缩ChatGPT等模型文本提示&#xff0c;极大节省AI算力_信息_段落_问题 在长文本场景中&#xff0c;ChatGPT 等大语言模型经常面临更高算力成本、更长的延迟以及更差的性能。为了解决这三大难题&#xff0c;微软开源了 LongLLMLingua。 据悉&#xff0c;L…

如何在docker容器中安装Elasticsearch中的IK分词器

目录 &#xff08;1&#xff09;准备IK分词器的压缩包 &#xff08;2&#xff09;进入docker容器 &#xff08;3&#xff09;移动ik分词器到指定文件夹 &#xff08;4&#xff09;解压分词器压缩包 &#xff08;5&#xff09;测试IK分词器是否安装成功 &#xff08;1&#…

【Image captioning】论文阅读八—ClipCap: CLIP Prefix for Image Captioning_2021

中文标题&#xff1a;ClipCap: CLIP前缀用于图像描述&#xff08;ClipCap: CLIP Prefix for Image Captioning&#xff09; 文章目录 1. 介绍2. 相关工作3. 方法3.1 综述3.2 语言模型微调3.3 映射网络架构3.4 推理 4. 结果5. 结论 摘要&#xff1a;图像描述是视觉语言理解中的…

C语言——操作符详解2

目录 0.过渡0.1 不创建临时变量&#xff0c;交换两数0.2 求整数转成二进制后1的总数 1.单目表达式2. 逗号表达式3. 下标访问[ ]、函数调用( )3.1 下标访问[ ]3.2 函数调用( ) 4. 结构体成员访问操作符4.1 结构体4.1.1 结构体的申明4.1.2 结构体变量的定义和初始化 4.2 结构体成…

SpringBoot 配置类解析

全局流程解析 配置类解析入口 postProcessBeanDefinitionRegistry逻辑 processConfigBeanDefinitions逻辑 执行逻辑解析 执行入口 ConfigurationClassPostProcessor.processConfigBeanDefinitions()方法中的do while循环体中 循环体逻辑 parse方法调用链 doProcessConfigurat…

【C++中STL】list链表

List链表 基本概念构造函数赋值和交换大小操作插入和删除数据存取反转和排序 基本概念 将数据进行链式存储 链表list是一种物理存储单元上非连续的存储结构&#xff0c;数据元素的逻辑顺序是通过链表中的指针链接实现的&#xff0c;链表是由一系列结点组成&#xff0c;结点的组…