Xilinx FPGA:vivado SPI实现FLASH通信

一、实验要求

        要求使用SPI协议实现对flash芯片的页编程、读操作、页擦除等功能。

二、模块划分

大概的时序图:

三、程序设计
(1)接收端模块
`timescale 1ns / 1ps
module uart_rx(input                    sys_clk   ,input                    rst_n     ,(* MARK_DEBUG="true" *)input                    rx_data   ,(* MARK_DEBUG="true" *)output    reg[7:0]       uart_data ,(* MARK_DEBUG="true" *)output    reg            rx_done  );parameter               SYSCLK = 50_000_000 ;parameter               Baud   = 115200     ; parameter               COUNT  = SYSCLK/Baud;parameter               MID    = COUNT/2    ;///start_flagreg             rx_reg1 ;reg             rx_reg2 ;(* MARK_DEBUG="true" *)wire            start_flag ;always@(posedge sys_clk )if(!rst_n)beginrx_reg1 <= 1 ;rx_reg2 <= 1 ;endelsebeginrx_reg1 <= rx_data  ;rx_reg2 <= rx_reg1  ;endassign  start_flag = ~rx_reg1 & rx_reg2 ;/rx_flag(* MARK_DEBUG="true" *)reg               rx_flag  ;(* MARK_DEBUG="true" *)reg[4:0]          cnt_bit  ;(* MARK_DEBUG="true" *)reg[9:0]          cnt      ;always@(posedge sys_clk )if(!rst_n)rx_flag <= 0 ;else if ( start_flag == 1 )rx_flag <= 1 ;else if ( cnt_bit == 10 && cnt == MID - 1 )rx_flag <= 0 ;elserx_flag <= rx_flag ;//cntalways@(posedge sys_clk )if(!rst_n)cnt <= 0 ;else if ( rx_flag == 1 )beginif ( cnt == COUNT - 1 )cnt <= 0 ;elsecnt <= cnt +1 ;endelsecnt <= 0 ;/cnt_bitalways@(posedge sys_clk )if(!rst_n)cnt_bit <= 0 ;else if ( rx_flag == 1 )beginif ( cnt == COUNT - 1 )beginif( cnt_bit == 10 )cnt_bit <= 0 ;elsecnt_bit <= cnt_bit +1 ;endelsecnt_bit <= cnt_bit ;endelsecnt_bit <= 0 ;///data_reg                         (* MARK_DEBUG="true" *)reg[8:0]         data_reg  ;  //data_reg:01234567 [8]always@(posedge sys_clk )     //cnt_bit:[0]12345678[9][10]if(!rst_n)data_reg <= 0 ;else if ( rx_flag == 1 )beginif ( cnt_bit > 0 && cnt_bit < 10 && cnt == MID - 1)data_reg[cnt_bit - 1 ] <= rx_data  ;elsedata_reg <= data_reg  ;endelsedata_reg <= 0 ;check(* MARK_DEBUG="true" *)reg                  check   ;always@(posedge sys_clk )if(!rst_n)check <= 0 ;else if ( rx_flag == 1 )beginif ( cnt_bit == 10 )check <= ^data_reg  ;elsecheck <= 0 ;endelsecheck <= 0 ;uart_dataparameter            MODE_CHECK = 0 ;always@(posedge sys_clk )if(!rst_n)uart_data <= 0 ;else if ( rx_flag == 1 )beginif ( cnt_bit == 10 && cnt == 10 && check == MODE_CHECK)uart_data <= data_reg[7:0] ;elseuart_data <= uart_data  ;endelseuart_data <= uart_data  ;rx_donealways@(posedge sys_clk )if(!rst_n)rx_done <= 0 ;else if ( rx_flag == 1 )beginif ( cnt_bit == 10 && cnt == MID/2 - 1 )rx_done <= 1 ;elserx_done <= 0 ;endelserx_done <= 0 ;endmodule
(2)cmd模块
`timescale 1ns / 1ps
长度 指令 地址 数据
/* 这个模块的功能是把接收到的数据放在寄存器里,这个模块的功能也可以由fifo和ram完成*/
module cmd_data(input                      clk      ,input                      rst_n    ,(* MARK_DEBUG="true" *)input       [7:0]          data_in  ,(* MARK_DEBUG="true" *)input                      rx_done  ,(* MARK_DEBUG="true" *)output     reg             spi_start,(* MARK_DEBUG="true" *)output     reg [7:0]       cmd      ,(* MARK_DEBUG="true" *)output     reg [7:0]       length   ,//长度(* MARK_DEBUG="true" *)output     reg [23:0]      addr     ,//地址(* MARK_DEBUG="true" *)output     reg [7:0]       data_out );parameter               idle  =   1  ;parameter               s0    =   2  ;//长度parameter               s1    =   3  ;//指令parameter               s2    =   4  ;//地址parameter               s3    =   5  ;//地址parameter               s4    =   6  ;//地址parameter               s5    =   7  ;//数据(* MARK_DEBUG="true" *)reg[3:0]                 cur_state    ;(* MARK_DEBUG="true" *)reg[3:0]                 next_state   ;state1always@(posedge clk)if(!rst_n)cur_state <= idle ;elsecur_state <= next_state ;///state2always@(*)case(cur_state)idle :beginif ( rx_done )//长度next_state = s0 ;else next_state = cur_state ;ends0   :beginif ( rx_done )//指令next_state = s1 ;elsenext_state = cur_state ;ends1   :beginif ( rx_done )//地址next_state = s2 ;elsenext_state = cur_state ;ends2   :beginif ( rx_done )//地址next_state = s3 ;elsenext_state = cur_state ;ends3   :beginif ( rx_done )//地址next_state = s4 ;elsenext_state = cur_state ;ends4   :beginif ( rx_done )//数据next_state = s5 ;elsenext_state = cur_state ;ends5   :          next_state = idle ;default:next_state = idle ;endcase//state3always@(posedge clk )if(!rst_n)beginspi_start <= 0 ;cmd       <= 0 ;length    <= 0 ;addr      <= 0 ;data_out  <= 0 ;endelsecase(cur_state)idle :beginspi_start <= 0 ; cmd       <= cmd ;addr      <= addr ;data_out  <= data_out ;if ( rx_done )length <= data_in ;elselength <= length ;ends0   :beginspi_start <= 0        ;length    <= length   ;addr      <= addr     ;///其他保持不变避免自动清零data_out  <= data_out ;if ( rx_done )cmd <= data_in ;elsecmd <= cmd ;ends1   :beginspi_start <= 0        ;length    <= length   ;data_out  <= data_out ; cmd       <= cmd      ;if ( rx_done )addr[23:16] <= data_in ;elseaddr <= addr ;ends2   :beginspi_start <= 0        ;length    <= length   ;data_out  <= data_out ; cmd       <= cmd      ;if ( rx_done )addr[15:8] <= data_in ;elseaddr <= addr ;ends3   :beginspi_start <= 0        ;length    <= length   ;data_out  <= data_out ; cmd       <= cmd      ;if ( rx_done )addr[7:0] <= data_in ;elseaddr <= addr ;ends4   :beginspi_start <= 0        ; length    <= length   ; cmd       <= cmd      ;addr      <= addr     ;if ( rx_done )data_out <= data_in ;elsedata_out <= data_out ;end s5   :beginspi_start <= 1        ;cmd       <= cmd      ;length    <= length   ;addr      <= addr     ;data_out  <= data_out ;enddefault:   beginspi_start <= 0 ;cmd       <= cmd      ;length    <= length   ;addr      <= addr     ;data_out  <= data_out ;endendcaseendmodule
(3)send_data模块
`timescale 1ns / 1ps
/*
将数据发送给主机
指令 地址 数据是不能直接给主机模块的
长度可以直接给主机
*/
module send_data(input                   clk      ,input                   rst_n    ,(* MARK_DEBUG="true" *)input       [7:0]       cmd      ,(* MARK_DEBUG="true" *)input       [23:0]      addr     ,(* MARK_DEBUG="true" *)input       [7:0]       data_in  ,(* MARK_DEBUG="true" *)input                   done_bit ,///传输完一个字节的结束信号(* MARK_DEBUG="true" *)input                   done     ,SPI传输完一次数据的结束信号(* MARK_DEBUG="true" *)output      reg[7:0]    data_spi );parameter              idle = 1 ;parameter              s0   = 2 ;parameter              s1   = 3 ;parameter              s2   = 4 ;parameter              s3   = 5 ;parameter              s4   = 6 ;(* MARK_DEBUG="true" *)reg[3:0]                cur_state  ;(* MARK_DEBUG="true" *)reg[3:0]                next_state ;///state1always@(posedge clk )if(!rst_n)cur_state <= idle ;elsecur_state <= next_state ;state2always@(*)case(cur_state)idle :   next_state = s0 ;s0   :beginif ( done_bit )next_state = s1 ;else if ( done )next_state = idle ;   ///不加这个信号的话后面发送数据会锁在s1状态elsenext_state = cur_state ;ends1   :beginif ( done_bit )next_state = s2 ;else if ( done )next_state = idle ;elsenext_state = cur_state ;ends2   :beginif ( done_bit )next_state = s3 ;else if ( done )next_state = idle ;elsenext_state = cur_state ;ends3   :beginif ( done_bit )next_state = s4 ;else if ( done )next_state = idle ;elsenext_state = cur_state ;ends4   :beginif ( done_bit )next_state = idle ;else if ( done )next_state = idle ;elsenext_state = cur_state ;enddefault:next_state = idle ;endcase//state3always@(posedge clk )if(!rst_n)data_spi <= 0 ;elsecase(cur_state)idle :  data_spi <= 0           ;  s0   :  data_spi <= cmd         ;s1   :  data_spi <= addr[23:16] ;s2   :  data_spi <= addr[15:8]  ;s3   :  data_spi <= addr[7:0]   ;s4   :  data_spi <= data_in     ;default:data_spi <= 0 ;endcaseendmodule
(4)SPI_Master模块
`timescale 1ns / 1ps
module 
SPI_Master #(
//    parameter               all_bit  = 16  ,parameter               data_LEN = 8   ,parameter               data_bit = 8   ,parameter               delay    = 8     
)
((* MARK_DEBUG="true" *)input                           clk            ,(* MARK_DEBUG="true" *)input                           rst_n          ,(* MARK_DEBUG="true" *)input                           spi_start      ,(* MARK_DEBUG="true" *)input                           miso           ,(* MARK_DEBUG="true" *)input       [7:0]               data_in        ,(* MARK_DEBUG="true" *)input       [data_LEN-1:0]      data_len       ,(* MARK_DEBUG="true" *)output      reg                 mosi           ,(* MARK_DEBUG="true" *)output      reg                 done           ,整体的结束信号(* MARK_DEBUG="true" *)output      reg[data_bit -1:0]  data_out_tx    ,(* MARK_DEBUG="true" *)output      reg                 sck            ,(* MARK_DEBUG="true" *)output      reg                 cs             ,(* MARK_DEBUG="true" *)output                          done_bit     字节的结束信号
);
//    localparam               data_in = 16'b0011_1101_0000_0000     ;
//    localparam               data_len = 2 ; //    localparam               data_in = 16'b0011_1101    ;
//    localparam               data_len = 1 ; ///状态机/(* MARK_DEBUG="true" *)reg[31:0]           cnt_sck     ;(* MARK_DEBUG="true" *)reg[31:0]           cnt_bit     ;(* MARK_DEBUG="true" *)reg[2:0]            cur_state   ;(* MARK_DEBUG="true" *)reg[2:0]            next_state  ;localparam          IDLE  =  0       ;localparam          s0    =  1       ;localparam          s1    =  2       ;localparam          s2    =  3       ;   /state1always@(posedge clk )if(!rst_n)cur_state <= IDLE ;elsecur_state <= next_state ;///state2always@(*)case(cur_state)IDLE :beginif ( spi_start == 1 )next_state <= s0 ;elsenext_state <= cur_state ;ends0   :beginif ( cnt_sck == 1 )next_state = s1 ;elsenext_state = cur_state ;ends1   :beginif ( (cnt_bit+1)/8 == data_len && cnt_sck == delay -1 )next_state = s2 ;elsenext_state = cur_state ;ends2   :beginif ( cnt_sck == delay -1 )next_state = IDLE ;elsenext_state = cur_state ;enddefault:next_state = IDLE;endcasestate3always@(posedge clk )if(!rst_n)begincnt_bit <= 0 ;cnt_sck <= 0 ;mosi    <= 0 ;sck     <= 0 ;cs      <= 1 ;data_out_tx<= 0 ;done    <= 0 ;endelse begincase (cur_state)IDLE  :begincnt_bit <= 0 ; cnt_sck <= 0 ; mosi    <= 0 ; sck     <= 0 ; cs      <= 1 ; data_out_tx<= data_out_tx ; done    <= 0 ; ends0    :begincnt_bit <= 0 ;  mosi    <= 0 ; sck     <= 0 ; cs      <= 0 ; data_out_tx<= 0 ; done    <= 0 ; cnt_sckif ( cnt_sck == delay -1 )  cnt_sck <= 0 ;         else                        cnt_sck <= cnt_sck +1 ;ends1    :begincs      <= 0 ; done    <= 0 ; /cnt_sckif ( cnt_sck == delay -1 )cnt_sck <= 0 ;elsecnt_sck <= cnt_sck +1 ;/sck if ( cnt_sck == delay/2 -1 || cnt_sck == delay -1 )sck <= ~sck ;elsesck <= sck ;/cnt_bit  if ( cnt_sck == delay -1 )beginif ( cnt_bit == data_len*data_bit -1 )cnt_bit <= 0 ;elsecnt_bit <= cnt_bit +1 ;endelsecnt_bit <= cnt_bit ;//mosiif ( cnt_sck == 2 )
//                                     mosi <= data_in [ (data_len*data_bit - 1) - cnt_bit ] ;mosi <= data_in [ 7 -(cnt_bit)%8 ] ;根据data_in的不同进行调整elsemosi <= mosi ;    /data_outif ( cnt_sck == delay -2 )/上升沿采集数据  data_out_tx <= { data_out_tx [data_bit-2:0] , miso }   ;elsedata_out_tx <= data_out_tx ;              ends2    :begincnt_bit <= 0 ; mosi    <= 0 ;  cs      <= 1 ; sck     <= 0 ;data_out_tx<= data_out_tx ; /cnt_sckif ( cnt_sck == delay -1 )cnt_sck <= 0 ;elsecnt_sck <= cnt_sck +1 ;///sck
//                                if ( cnt_sck == delay/2 -1 || cnt_sck == delay -1 )
//                                     sck <= ~sck ;
//                                else
//                                     sck <= sck ;doneif ( cnt_sck == delay -1 )done <= 1 ;elsedone <= 0 ;enddefault:    begincnt_bit <= 0 ; cnt_sck <= 0 ; mosi    <= 0 ; sck     <= sck ; cs      <= 1 ; data_out_tx<= data_out_tx ; done    <= 0 ; endendcaseendassign   done_bit = ( cnt_bit %8 == 7 && cnt_sck == delay -1 )?1:0 ;endmodule
(5)发送端模块
`timescale 1ns / 1ps
module uart_tx(input                 sys_clk   ,input                 rst_n     ,input                 tx_start  ,input     [7:0]       rd_data   ,output    reg         tx_data   ,output    reg         tx_done);parameter            SYSCLK = 50_000_000 ;parameter            Baud   = 115200     ;parameter            COUNT  = SYSCLK/Baud;parameter            MID    = COUNT/2    ;//start_flagreg              tx_reg1 ;reg              tx_reg2 ;wire             start_flag ;always@(posedge sys_clk )if(!rst_n)begintx_reg1 <= 0 ;tx_reg2 <= 0 ;endelsebegintx_reg1 <= tx_start ;tx_reg2 <= tx_reg1  ;endassign start_flag = tx_reg1 & ~tx_reg2 ;//tx_flagreg              tx_flag  ;reg [9:0]        cnt      ;reg [4:0]        cnt_bit  ; //0 12345678 9 10 always@(posedge sys_clk )if(!rst_n)tx_flag <= 0 ;else if ( start_flag )tx_flag <= 1 ;else if ( cnt == COUNT -1 && cnt_bit == 10 )tx_flag <= 0 ;elsetx_flag <= tx_flag ;//cntalways@(posedge sys_clk )if(!rst_n)cnt <= 0 ;else if ( tx_flag )beginif ( cnt == COUNT -1 )cnt <= 0 ;elsecnt <= cnt +1 ;endelsecnt <= 0 ;//cnt_bit always@(posedge sys_clk )if(!rst_n)cnt_bit <= 0 ;else if ( tx_flag )beginif ( cnt == COUNT -1 )beginif ( cnt_bit == 10 )cnt_bit <= 0 ;elsecnt_bit <= cnt_bit +1 ;endelsecnt_bit <= cnt_bit ;endelsecnt_bit <= 0 ;//寄存rd_data     rd_data随着cur_state变为STOP后清零,在uart_tx模块//中,cnt_bit == 0 的时候可以捕捉到数据reg[7:0]              data_reg  ;always@(posedge sys_clk )if(!rst_n)data_reg <= 0 ;else if ( tx_flag )beginif ( cnt_bit == 0 && cnt == MID -1 )data_reg <= rd_data ;elsedata_reg <= data_reg ;endelsedata_reg <= data_reg ;//tx_dataparameter                  MODE_CHECK = 0 ;always@(posedge sys_clk )if(!rst_n)                  //cnt_bit: 0 12345678 9 10tx_data <= 0 ;          //rd_data: 01234567else if ( tx_flag )beginif ( cnt_bit > 0 && cnt_bit <9 )tx_data <= data_reg [ cnt_bit -1 ] ;else if ( cnt_bit == 0 )tx_data <= 0 ;else if ( cnt_bit == 10 )tx_data <= 1 ;else if ( cnt_bit == 9 )tx_data <= (MODE_CHECK == 0 )? ^rd_data : ~^rd_data ;elsetx_data <= tx_data ;                endelsetx_data <= 1 ;//tx_done always@(posedge sys_clk )if(!rst_n)tx_done <= 0 ;else if ( tx_flag )beginif ( cnt == COUNT -1 && cnt_bit == 10 )tx_done <= 1 ;elsetx_done <= 0 ;endelsetx_done <= 0 ;endmodule
(6)引脚分配
set_property PACKAGE_PIN K17 [get_ports clk]
set_property PACKAGE_PIN P20 [get_ports cs]
set_property PACKAGE_PIN T20 [get_ports miso]
set_property PACKAGE_PIN V20 [get_ports mosi]
set_property PACKAGE_PIN M20 [get_ports rst_n]
set_property PACKAGE_PIN U15 [get_ports rx_data]
set_property PACKAGE_PIN U20 [get_ports sck]
set_property PACKAGE_PIN W15 [get_ports tx_data]
set_property IOSTANDARD LVCMOS33 [get_ports clk]
set_property IOSTANDARD LVCMOS33 [get_ports cs]
set_property IOSTANDARD LVCMOS33 [get_ports miso]
set_property IOSTANDARD LVCMOS33 [get_ports mosi]
set_property IOSTANDARD LVCMOS33 [get_ports rst_n]
set_property IOSTANDARD LVCMOS33 [get_ports rx_data]
set_property IOSTANDARD LVCMOS33 [get_ports sck]
set_property IOSTANDARD LVCMOS33 [get_ports tx_data]
四、实验结果

FLASH指令集(用到的已经用红框标出来了):

(1)打开写使能

返回FF,捕捉到波形

(2)打开读状态寄存器

返回值02表示打开成功

(3)写入数据

  向01这个地址里面写入22    返回FF

(4)读出

返回刚才写入的数字22

(5)擦除

(6)读出

经过刚才的擦除操作,从000001这个地址里看能否读出来数,读不出来就表示擦除成功

返回FF,擦除成功

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

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

相关文章

ShardingSphere实战(2)- 水平分表

项目环境&#xff1a; JDK11 MySQL 8.0.30 Springboot 2.7.4 Mybatis ShardingSphere HikariCP 连接池 一、Maven 依赖 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><versi…

C++ | string

前言 本篇博客讲解c中的string类的使用(常用接口) &#x1f493; 个人主页&#xff1a;普通young man-CSDN博客 ⏩ 文章专栏&#xff1a;C_普通young man的博客-CSDN博客 ⏩ 本人giee:普通小青年 (pu-tong-young-man) - Gitee.com 若有问题 评论区见&#x1f4dd; &#x1f389…

Redis持久化之RDB和AOF详解

持久化是确保 Redis 数据在服务器重启或崩溃时不丢失的关键功能。由于 Redis 是基于内存的数据库&#xff0c;如果不进行持久化&#xff0c;所有数据都存在于内存中&#xff0c;一旦服务器进程退出&#xff0c;内存中的数据就会丢失。持久化机制可以将 Redis 的数据库状态保存到…

C# Unity 面向对象补全计划 之 访问修饰符

本文仅作学习笔记与交流&#xff0c;不作任何商业用途&#xff0c;作者能力有限&#xff0c;如有不足还请斧正 本系列旨在通过补全学习之后&#xff0c;给出任意类图都能实现并做到逻辑上严丝合缝

vue3项目结构梳理:

总览 1.vscode文件&#xff1a; 通常用于存放Visual Studio Code编辑器的插件的配置 2.node_moudles文件夹&#xff1a; 这个文件夹包含了项目所需的所有npm依赖包。&#xff08;需要在根目录下执行npm i命令安装这个文件夹&#xff09; 或者在项目根目录&#xff08;packa…

postgresql密码复杂度验证和有效期

前言 为了数据库安全以及应对等保测评等要求&#xff0c;我们需要设置密码复杂度。我们通过passwordcheck模块实现复杂度检测功能。 启用密码复杂度验证 找到自己安装pg库的配置文件目录&#xff0c;修改postgresql.conf vim postgresql.conf修改如下内容 shared_preload_…

中国十大顶级哲学家,全球公认的伟大思想家颜廷利:人类为何拥有臀部

人类为何拥有臀部&#xff1f;若众生皆无此部位&#xff0c;又如何能寻得一处真正属于自己的“座位”&#xff1f;在博大精深的中国传统文化中&#xff0c;汉字“座”与“坐”均蕴含“土”字元素。在易经的智慧里&#xff0c;作为五行之一的“土”&#xff0c;象征着人类社会的…

MySQL8--用户与权限管理

原文网址&#xff1a;MySQL8--用户与权限管理_IT利刃出鞘的博客-CSDN博客 简介 说明 本文介绍MySQL8的用户与权限的管理&#xff0c;包括&#xff1a;用户的创建与删除、授权与撤销权限等。 为什么要管理用户与权限&#xff1f; 目的是保证数据库的安全性&#xff0c;只授…

Unity Shader unity文档学习笔记(十八):unity雾效原理

看很多文章用近平面远平面组成矩阵后转到裁剪空间下通过Z值来解&#xff0c;实际更简单的方式可以直接通过判断距离来实现 FogMgr控制远近面 public class TestFog : MonoBehaviour {public int startDis 0;public int endDis 50;public Vector4 fogParam;public void Awak…

文件未保存后能否恢复?分享实用恢复指南,6个方法

在日常用电脑时文件未保存而导致的数据丢失&#xff0c;是许多人都会遭遇的棘手问题。那么面对这样的情况&#xff0c;文件真的能够恢复吗&#xff1f;本文将深入分析文件恢复的可能性&#xff0c;并提供一系列实用的建议。 一、了解文件恢复的基础 首先我们需要明白文件恢复并…

并发--快速查询死锁信息

使用jstack查看线程堆栈信息 jstack&#xff1a;jdk提供的一个工具&#xff0c;可以查看java进程中线程堆栈信息。 位于&#xff1a;jdk1.8.0_121\bin包下 死锁代码 public class DeadLockDemo {private static String A "A";private static String B "B"…

uniapp微信小程序本地和真机调试文件图片上传成功但体验版不成功

文章目录 导文是因为要添加服务器域名&#xff01; 导文 uniapp微信小程序本地和真机调试文件图片上传成功但体验版不成功 uniapp微信小程序体验版上传图片不成功 微信小程序本地和真机调试文件图片上传成功但体验版不成功 是因为要添加服务器域名&#xff01; 先看一下 你小程…

[Docker][Docker Image]详细讲解

目录 1.Docker镜像是什么&#xff1f;2.Docker镜像加载原理1.bootfs2.rootfs3.为什么CentOS镜像几个G&#xff0c;而Docker CentOS镜像才几百M&#xff1f;1.CentOS2.Docker CentOS 3.镜像分层1.Union FS2.分层理解3.容器层 vs 镜像层 4.镜像命令1.docker images2.docker image…

fusetech_plus项目问题解决(若依魔改系列)

首页一直出现这个问题解决&#xff0c;是因为访问入口都在admin模块&#xff0c;所以必须在admin的pom里 引入blog模块 template might not exist or might not be accessible by any of the configured Template Resolvers 这个问题 类似mapper找不到问题 路径不对&#xf…

Android Compose 中的 UI 状态魔法:优雅处理加载、空状态和数据展示

Android Compose 中的 UI 状态魔法:优雅处理加载、空状态和数据展示 在Jetpack Compose中处理UI界面状态的这种情况,我们可以使用一个密封类(sealed class)来表示不同的UI状态,然后根据状态来显示相应的UI。以下是一个实现这种功能的示例: 首先,定义一个表示UI状态的密…

Selenium与WebDriver:Errno 8 Exec格式错误的多种解决方案

概述 在使用Selenium和WebDriver进行网页自动化时&#xff0c;可能会遇到各种错误。其中一个常见问题是执行格式错误&#xff08;Errno 8 Exec format error&#xff09;。这个错误通常在运行ChromeDriver时出现&#xff0c;错误提示涉及路径中的某个文件&#xff0c;如THIRD_…

什么是三级管?怎么区分PNP和NPN两种?

1.什么是三极管&#xff1f; 三极管&#xff0c;全称应为半导体三极管&#xff0c;也称双极型晶体管、晶体三极管&#xff0c;是一种控制电流的半导体器件。其作用是把微弱信号放大成幅度值较大的电信号&#xff0c;也用作无触点开关。三极管是半导体基本元器件之一&#xff0…

qiankun 微前端 隔离子应用样式,解决 ant-design-vue 子应用样式污染问题(已落地)

样式冲突产生原因 先分析乾坤qiankun 构建之后&#xff0c;会根据你的配置 给每个子应用生成一个id&#xff0c; 当加载到对应子应用的时候&#xff0c;就把内容放到对应的id 标签里去&#xff0c; 这样能有效的隔离 js 代码&#xff0c;但是样式是加载在全局的 所以 当两个子…

080基于ssm+vue的大学生兼职信息系统

开发语言&#xff1a;Java框架&#xff1a;ssmJDK版本&#xff1a;JDK1.8服务器&#xff1a;tomcat7数据库&#xff1a;mysql 5.7&#xff08;一定要5.7版本&#xff09;数据库工具&#xff1a;Navicat11开发软件&#xff1a;eclipse/myeclipse/ideaMaven包&#xff1a;Maven3.…

matlab仿真 信道编码和交织(上)

&#xff08;内容源自详解MATLAB&#xff0f;SIMULINK 通信系统建模与仿真 刘学勇编著第八章内容&#xff0c;有兴趣的读者请阅读原书&#xff09; ​​​ ​ ​ ​ clear all N10;%信息比特的行数 n7;%hamming码组长度n2^m-1 m3;%监督位长度 [H,G]hammgen(m);%产生(n,n-…