9 - QSPI Flash读写测试实验

文章目录

  • 1 实验任务
  • 2 系统框图
  • 3 软件设计

1 实验任务

本实验任务是使用PS侧的QSPI Flash控制器,先后对QSPI Flash 进行写、 读操作。通过对比读出的数据是否等于写入的数据, 从而验证读写操作是否正确。

2 系统框图

在这里插入图片描述

3 软件设计

注意事项:这里必须详细记录一下整个的调试过程

  1. 最初在进行程序固化实验时
    • 1)从SD卡可以启动
    • 2)从QSPI Flash无法启动,显示回读数据错误,校验失败;此时,我一脸懵逼,因为刚拿到开发板的时候,也进行过程序固化实验,清晰地记得当时从SD卡和QSPI Flash启动都是可以的,怎么现在从QSPI Flash启动就不行了呢?在没有手段和头绪的情况下,只能怀疑Flash芯片是不是坏了
  2. 修改例程使程序能够遍历Flash芯片的16MB空间(W25Q256JV芯片大小为32MB,但是QSPI Flash控制器使用3字节地址,只能访问16MB的空间)
  • 1)测试发现0 - 8MB数据读写比较有错误,8 - 16MB数据读写比较正常
  • 2)研究芯片手册发现,芯片有写保护设置,通过状态寄存器的TB位、BP3~BP0位、CMP位和WPS位等可以控制芯片的哪些块只能读取不能擦除和写入,即写保护
  • 3)编写FlashReadStatus函数,读取Flash的状态寄存器,发现TB=1,BP3~BP0=1000b,CMP=0,WPS=0,对应芯片的低四分之一区域被写保护了
  • 4)编写FlashWriteStatus函数,将状态寄存器的值恢复到出厂设置状态
  1. 在恢复状态寄存器的出场设置状态时发现,Status Register-1的QE位写0写不进去,一直为1,最后在芯片手册的9.8 Ordering Information小节找到了答案,如下图所示,对于W25Q256JV系列芯片,型号最后一位是Q和N的,QE位出场设置为1且固定(即不可修改)
    在这里插入图片描述
/***************************** Include Files *********************************/
#include "xparameters.h"	/* SDK generated parameters */
#include "xqspips.h"		/* QSPI device driver */
#include "stdio.h"
#include "sleep.h"
/************************** Constant Definitions *****************************/
#define QSPI_DEVICE_ID		XPAR_XQSPIPS_0_DEVICE_ID/* The following constants define the commands which may be sent to the FLASH device. */
#define WRITE_STATUS_CMD	0x01
#define WRITE_CMD			0x02
#define READ_CMD			0x03
#define WRITE_DISABLE_CMD	0x04
#define READ_STATUS_CMD		0x05
#define WRITE_ENABLE_CMD	0x06
#define FAST_READ_CMD		0x0B
#define DUAL_READ_CMD		0x3B
#define QUAD_READ_CMD		0x6B
#define BULK_ERASE_CMD		0xC7
#define	SEC_ERASE_CMD		0xD8
#define READ_ID				0x9F#define WRITE_STATUS2_CMD	0x31
#define WRITE_STATUS3_CMD	0x11#define READ_STATUS2_CMD	0x35
#define READ_STATUS3_CMD	0x15/* The following constants define the offsets within a FlashBuffer data type for each kind of data. */
#define COMMAND_OFFSET		0 /* FLASH instruction */
#define ADDRESS_1_OFFSET	1 /* MSB byte of address to read or write */
#define ADDRESS_2_OFFSET	2 /* Middle byte of address to read or write */
#define ADDRESS_3_OFFSET	3 /* LSB byte of address to read or write */
#define DATA_OFFSET			4 /* Start of Data for Read/Write */
#define DUMMY_OFFSET		4 /* Dummy byte offset for fast, dual and quad reads */
#define DUMMY_SIZE			1 /* Number of dummy bytes for fast, dual and quad reads */
#define RD_ID_SIZE			4 /* Read ID command + 3 bytes ID response */
#define BULK_ERASE_SIZE		1 /* Bulk Erase command size */
#define SEC_ERASE_SIZE		4 /* Sector Erase command + Sector address */#define OVERHEAD_SIZE		4/* The following constants specify the page size, sector size, and number of pages and sectors for the FLASH. */
#define SECTOR_SIZE			0x1000
#define NUM_SECTORS			0x1000
#define NUM_PAGES			0x20000
#define PAGE_SIZE			256/* Number of flash pages to be written.*/
#define PAGE_COUNT			16 // 4KB/* Flash address to which data is ot be written.*/
#define TEST_ADDRESS		0x00000000
#define UNIQUE_VALUE		0x00#define MAX_DATA			(PAGE_COUNT * PAGE_SIZE)
/**************************** Type Definitions *******************************//***************** Macros (Inline Functions) Definitions *********************//************************** Function Prototypes ******************************/
void FlashErase(XQspiPs *QspiPtr, u32 Address, u32 ByteCount);
void FlashWrite(XQspiPs *QspiPtr, u32 Address, u32 ByteCount, u8 Command);
void FlashRead(XQspiPs *QspiPtr, u32 Address, u32 ByteCount, u8 Command);
int  FlashReadID(XQspiPs *QspiPtr);
void FlashReadStatus(XQspiPs *QspiPtr);
void FlashWriteStatus(XQspiPs *QspiPtr);
void FlashQuadEnable(XQspiPs *QspiPtr);
int  QspiFlashPolledExample(XQspiPs *QspiInstancePtr, u16 QspiDeviceId);
/************************** Variable Definitions *****************************/
static XQspiPs QspiInstance;u8 ReadBuffer[MAX_DATA + DATA_OFFSET + DUMMY_SIZE];
u8 WriteBuffer[PAGE_SIZE + DATA_OFFSET];u32 BadSectorCount = 0;
/*****************************************************************************/
int main(void)
{//int Status;//printf("QSPI FLASH Write and Read Test\n");/* Run the Qspi Interrupt example.*/Status = QspiFlashPolledExample(&QspiInstance, QSPI_DEVICE_ID);if (Status != XST_SUCCESS) {printf("QSPI FLASH Polled Example Test Failed\n");return XST_FAILURE;}//printf("BadSectorCount = %lu\n", BadSectorCount);//printf("Successfully Ran QSPI FLASH Write and Read Test\n");//return XST_SUCCESS;
}
/*****************************************************************************/
int QspiFlashPolledExample(XQspiPs *QspiInstancePtr, u16 QspiDeviceId)
{//int Status;u8 *BufferPtr;u8 UniqueValue;int Count;int Page;XQspiPs_Config *QspiConfig;/* Initialize the QSPI driver so that it's ready to use */QspiConfig = XQspiPs_LookupConfig(QspiDeviceId);if (QspiConfig == NULL) {return XST_FAILURE;}Status = XQspiPs_CfgInitialize(QspiInstancePtr, QspiConfig, QspiConfig->BaseAddress);if (Status != XST_SUCCESS) {return XST_FAILURE;}/* Perform a self-test to check hardware build */Status = XQspiPs_SelfTest(QspiInstancePtr);if (Status != XST_SUCCESS) {return XST_FAILURE;}/* Set Manual Start and Manual Chip select options and drive HOLD_B pin high */XQspiPs_SetOptions(QspiInstancePtr, XQSPIPS_MANUAL_START_OPTION | XQSPIPS_FORCE_SSELECT_OPTION | XQSPIPS_HOLD_B_DRIVE_OPTION);/* Set the prescaler for QSPI clock */XQspiPs_SetClkPrescaler(QspiInstancePtr, XQSPIPS_CLK_PRESCALE_4);/* Assert the FLASH chip select */XQspiPs_SetSlaveSelect(QspiInstancePtr);/* Write the flash status */FlashWriteStatus(QspiInstancePtr);/* Read the flash status */FlashReadStatus(QspiInstancePtr);/* Read the flash id */FlashReadID(QspiInstancePtr);/* Enabe Quad SPI Operation */FlashQuadEnable(QspiInstancePtr);//printf("\n");/* Initialize the write buffer */for (UniqueValue = UNIQUE_VALUE, Count = 0; Count < PAGE_SIZE; Count++, UniqueValue++) {WriteBuffer[DATA_OFFSET + Count] = (u8)UniqueValue;}/* Traverse the entire flash */for (u32 SectorCount = 0; SectorCount < NUM_SECTORS; SectorCount++) {/* Erase the flash */FlashErase(QspiInstancePtr, TEST_ADDRESS + (SectorCount * SECTOR_SIZE), MAX_DATA);printf("Erase flash sector %lu done.\n", SectorCount);/* Write the flash */for (Page = 0; Page < PAGE_COUNT; Page++) {FlashWrite(QspiInstancePtr, (Page * PAGE_SIZE) + TEST_ADDRESS + (SectorCount * SECTOR_SIZE), PAGE_SIZE, WRITE_CMD);}printf("Write flash sector %lu done.\n", SectorCount);/* Read the flash */memset(ReadBuffer, 0x00, sizeof(ReadBuffer));FlashRead(QspiInstancePtr, TEST_ADDRESS + (SectorCount * SECTOR_SIZE), MAX_DATA, QUAD_READ_CMD);printf("Read flash sector %lu done.\n", SectorCount);/* Compare the data */BufferPtr = &ReadBuffer[DATA_OFFSET + DUMMY_SIZE];for (UniqueValue = UNIQUE_VALUE, Count = 0; Count < MAX_DATA; Count++, UniqueValue++) {if (BufferPtr[Count] != (u8)UniqueValue) {BadSectorCount++;printf("Sector %lu is bad, BufferPtr[%d] = %hhu\n", SectorCount, Count, BufferPtr[Count]);break;}}printf("Compare flash sector %lu done.\n", SectorCount);//printf("\n");}//return XST_SUCCESS;
}
/*****************************************************************************/
void FlashWrite(XQspiPs *QspiPtr, u32 Address, u32 ByteCount, u8 Command)
{u8 WriteEnableCmd = { WRITE_ENABLE_CMD };u8 ReadStatusCmd[] = { READ_STATUS_CMD, 0 };  /* must send 2 bytes */u8 FlashStatus[2];/** Send the write enable command to the FLASH so that it can be* written to, this needs to be sent as a seperate transfer before* the write*/XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL,sizeof(WriteEnableCmd));/** Setup the write command with the specified address and data for the* FLASH*/WriteBuffer[COMMAND_OFFSET]   = Command;WriteBuffer[ADDRESS_1_OFFSET] = (u8)((Address & 0xFF0000) >> 16);WriteBuffer[ADDRESS_2_OFFSET] = (u8)((Address & 0xFF00) >> 8);WriteBuffer[ADDRESS_3_OFFSET] = (u8)(Address & 0xFF);/** Send the write command, address, and data to the FLASH to be* written, no receive buffer is specified since there is nothing to* receive*/XQspiPs_PolledTransfer(QspiPtr, WriteBuffer, NULL,ByteCount + OVERHEAD_SIZE);/** Wait for the write command to the FLASH to be completed, it takes* some time for the data to be written*/while (1) {/** Poll the status register of the FLASH to determine when it* completes, by sending a read status command and receiving the* status byte*/XQspiPs_PolledTransfer(QspiPtr, ReadStatusCmd, FlashStatus,sizeof(ReadStatusCmd));/** If the status indicates the write is done, then stop waiting,* if a value of 0xFF in the status byte is read from the* device and this loop never exits, the device slave select is* possibly incorrect such that the device status is not being* read*/if ((FlashStatus[1] & 0x01) == 0) {break;}}
}
/*****************************************************************************/
void FlashRead(XQspiPs *QspiPtr, u32 Address, u32 ByteCount, u8 Command)
{/** Setup the write command with the specified address and data for the* FLASH*/WriteBuffer[COMMAND_OFFSET]   = Command;WriteBuffer[ADDRESS_1_OFFSET] = (u8)((Address & 0xFF0000) >> 16);WriteBuffer[ADDRESS_2_OFFSET] = (u8)((Address & 0xFF00) >> 8);WriteBuffer[ADDRESS_3_OFFSET] = (u8)(Address & 0xFF);if ((Command == FAST_READ_CMD) || (Command == DUAL_READ_CMD) ||(Command == QUAD_READ_CMD)) {ByteCount += DUMMY_SIZE;}/** Send the read command to the FLASH to read the specified number* of bytes from the FLASH, send the read command and address and* receive the specified number of bytes of data in the data buffer*/XQspiPs_PolledTransfer(QspiPtr, WriteBuffer, ReadBuffer,ByteCount + OVERHEAD_SIZE);
}
/*****************************************************************************/
void FlashErase(XQspiPs *QspiPtr, u32 Address, u32 ByteCount)
{u8 WriteEnableCmd = { WRITE_ENABLE_CMD };u8 ReadStatusCmd[] = { READ_STATUS_CMD, 0 };  /* must send 2 bytes */u8 FlashStatus[2];int Sector;/** If erase size is same as the total size of the flash, use bulk erase* command*/if (ByteCount == (NUM_SECTORS * SECTOR_SIZE)) {/** Send the write enable command to the FLASH so that it can be* written to, this needs to be sent as a seperate transfer* before the erase*/XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL,sizeof(WriteEnableCmd));/* Setup the bulk erase command*/WriteBuffer[COMMAND_OFFSET]   = BULK_ERASE_CMD;/** Send the bulk erase command; no receive buffer is specified* since there is nothing to receive*/XQspiPs_PolledTransfer(QspiPtr, WriteBuffer, NULL,BULK_ERASE_SIZE);/* Wait for the erase command to the FLASH to be completed*/while (1) {/** Poll the status register of the device to determine* when it completes, by sending a read status command* and receiving the status byte*/XQspiPs_PolledTransfer(QspiPtr, ReadStatusCmd,FlashStatus,sizeof(ReadStatusCmd));/** If the status indicates the write is done, then stop* waiting; if a value of 0xFF in the status byte is* read from the device and this loop never exits, the* device slave select is possibly incorrect such that* the device status is not being read*/if ((FlashStatus[1] & 0x01) == 0) {break;}}return;}/** If the erase size is less than the total size of the flash, use* sector erase command*/for (Sector = 0; Sector < ((ByteCount / SECTOR_SIZE) + 1); Sector++) {/** Send the write enable command to the SEEPOM so that it can be* written to, this needs to be sent as a seperate transfer* before the write*/XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL,sizeof(WriteEnableCmd));/** Setup the write command with the specified address and data* for the FLASH*/WriteBuffer[COMMAND_OFFSET]   = SEC_ERASE_CMD;WriteBuffer[ADDRESS_1_OFFSET] = (u8)(Address >> 16);WriteBuffer[ADDRESS_2_OFFSET] = (u8)(Address >> 8);WriteBuffer[ADDRESS_3_OFFSET] = (u8)(Address & 0xFF);/** Send the sector erase command and address; no receive buffer* is specified since there is nothing to receive*/XQspiPs_PolledTransfer(QspiPtr, WriteBuffer, NULL,SEC_ERASE_SIZE);/** Wait for the sector erse command to the* FLASH to be completed*/while (1) {/** Poll the status register of the device to determine* when it completes, by sending a read status command* and receiving the status byte*/XQspiPs_PolledTransfer(QspiPtr, ReadStatusCmd,FlashStatus,sizeof(ReadStatusCmd));/** If the status indicates the write is done, then stop* waiting, if a value of 0xFF in the status byte is* read from the device and this loop never exits, the* device slave select is possibly incorrect such that* the device status is not being read*/if ((FlashStatus[1] & 0x01) == 0) {break;}}Address += SECTOR_SIZE;}
}
/*****************************************************************************/
void FlashWriteStatus(XQspiPs *QspiPtr)
{//u8 WriteEnableCmd    = {WRITE_ENABLE_CMD};u8 WriteStatus1Cmd[] = {WRITE_STATUS_CMD, 0x0};u8 WriteStatus2Cmd[] = {WRITE_STATUS2_CMD, 0x00};u8 WriteStatus3Cmd[] = {WRITE_STATUS3_CMD, 0x60};// Write Status Register - 1XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL, sizeof(WriteEnableCmd));XQspiPs_PolledTransfer(QspiPtr, WriteStatus1Cmd, NULL, sizeof(WriteStatus1Cmd));usleep(10000);// Write Status Register - 2XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL, sizeof(WriteEnableCmd));XQspiPs_PolledTransfer(QspiPtr, WriteStatus2Cmd, NULL, sizeof(WriteStatus2Cmd));usleep(10000);// Write Status Register - 3XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL, sizeof(WriteEnableCmd));XQspiPs_PolledTransfer(QspiPtr, WriteStatus3Cmd, NULL, sizeof(WriteStatus3Cmd));usleep(10000);//return;
}
/*****************************************************************************/
void FlashReadStatus(XQspiPs *QspiPtr)
{//u8 ReadStatus1Cmd[] = {READ_STATUS_CMD, 0};u8 ReadStatus2Cmd[] = {READ_STATUS2_CMD, 0};u8 ReadStatus3Cmd[] = {READ_STATUS3_CMD, 0};u8 FlashStatus[2];// Read Status Register - 1XQspiPs_PolledTransfer(QspiPtr, ReadStatus1Cmd, FlashStatus, sizeof(ReadStatus1Cmd));printf("Flash Status Register 1 = 0x%02x\n", FlashStatus[1]);usleep(10000);// Read Status Register - 2XQspiPs_PolledTransfer(QspiPtr, ReadStatus2Cmd, FlashStatus, sizeof(ReadStatus2Cmd));printf("Flash Status Register 2 = 0x%02x\n", FlashStatus[1]);usleep(10000);// Read Status Register - 3XQspiPs_PolledTransfer(QspiPtr, ReadStatus3Cmd, FlashStatus, sizeof(ReadStatus3Cmd));printf("Flash Status Register 3 = 0x%02x\n", FlashStatus[1]);usleep(10000);//return;
}
/*****************************************************************************/
int FlashReadID(XQspiPs *QspiPtr)
{//int Status;u8 ReadIdCmd[] = {READ_ID, 0x23, 0x08, 0x09}; /* 3 dummy bytes */u8 FlashId[4];//Status = XQspiPs_PolledTransfer(QspiPtr, ReadIdCmd, FlashId, RD_ID_SIZE);if (Status != XST_SUCCESS) {return XST_FAILURE;}//printf("FlashID=0x%x 0x%x 0x%x\n", FlashId[1], FlashId[2], FlashId[3]);//return XST_SUCCESS;
}
/*****************************************************************************/
void FlashQuadEnable(XQspiPs *QspiPtr)
{//u8 WriteEnableCmd  = {WRITE_ENABLE_CMD};u8 ReadStatusCmd[] = {READ_STATUS2_CMD, 0};u8 QuadEnableCmd[] = {WRITE_STATUS2_CMD, 0};u8 FlashStatus[2];//if (ReadBuffer[1] == 0xEF) { // Winbond Serial Flash//XQspiPs_PolledTransfer(QspiPtr, ReadStatusCmd, FlashStatus, sizeof(ReadStatusCmd));QuadEnableCmd[1] = FlashStatus[1] | (1 << 1);//XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL, sizeof(WriteEnableCmd));XQspiPs_PolledTransfer(QspiPtr, QuadEnableCmd, NULL, sizeof(QuadEnableCmd));}//return;
}

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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

简述一下anythingllm与vllm

政安晨的个人主页&#xff1a;政安晨 欢迎 &#x1f44d;点赞✍评论⭐收藏 希望政安晨的博客能够对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出指正&#xff01; 关于 AnythingLLM 和 VLLM 的技术信息 AnythingLLM 特点与优势 对于主要需求在于文档问答…

JavaScript 数据类型和数据结构:从基础到实践

JavaScript 作为一门动态类型语言&#xff0c;以其灵活性和强大的功能在前端开发中占据了重要地位。理解 JavaScript 的数据类型和数据结构是掌握这门语言的关键。本文将带你深入探讨 JavaScript 中的数据类型、数据结构以及相关的类型检查和转换。 一、原始数据类型&#xff1…

深入解析XXL-JOB任务调度执行原理

引言 ​ 在分布式系统中&#xff0c;定时任务调度是业务场景中不可或缺的一环。面对海量任务、复杂依赖和高可用性要求&#xff0c;传统单机调度方案逐渐显得力不从心。XXL-JOB作为一款开源的分布式任务调度平台&#xff0c;凭借其轻量级、高扩展性和易用性成为众多企业的选择…

为AI聊天工具添加一个知识系统 之127 详细设计之68 编程 核心技术:Cognitive Protocol Language 之1

本文要点 要点 今天讨论的题目&#xff1a;本项目&#xff08;为使用AI聊天工具的两天者加挂一个知识系统&#xff09; 详细程序设计 之“编程的核心技术” 。 source的三个子类&#xff08;Instrument, Agent, Effector&#xff09; 分别表示--实际上actually &#xff0c;…

word转换为pdf后图片失真解决办法、高质量PDF转换方法

1、安装Adobe Acrobat Pro DC 自行安装 2、配置Acrobat PDFMaker &#xff08;1&#xff09;点击word选项卡上的Acrobat插件&#xff0c;&#xff08;2&#xff09;点击“首选项”按钮&#xff0c;&#xff08;3&#xff09;点击“高级配置”按钮&#xff08;4&#xff09;点…

Kafka生产者相关

windows中kafka集群部署示例-CSDN博客 先启动集群或者单机也OK 引入依赖 <dependency><groupId>org.apache.kafka</groupId><artifactId>kafka-clients</artifactId><version>3.9.0</version></dependency>关于主题创建 理论…

《Effective Objective-C》阅读笔记(下)

目录 内存管理 理解引用计数 引用计数工作原理 自动释放池 保留环 以ARC简化引用计数 使用ARC时必须遵循的方法命名规则 变量的内存管理语义 ARC如何清理实例变量 在dealloc方法中只释放引用并解除监听 编写“异常安全代码”时留意内存管理问题 以弱引用避免保留环 …

一、对iic类模块分析与使用

bmp280驱动代码 说明&#xff1a; 1、该模块用于获取气压&#xff0c;温度&#xff0c;海拔等数据。 vcc&#xff0c;gnd接电源 sda &#xff0c;scl 接iic通信引脚 2、该模块使用iic通信&#xff0c;通过iic发送请求相关类的寄存器值&#xff0c;芯片获取对应寄存器返回的数据…

辛格迪客户案例 | 祐儿医药科技GMP培训管理(TMS)项目

01 项目背景&#xff1a;顺应行业趋势&#xff0c;弥补管理短板 随着医药科技行业的快速发展&#xff0c;相关法规和标准不断更新&#xff0c;对企业的质量管理和人员培训提出了更高要求。祐儿医药科技有限公司&#xff08;以下简称“祐儿医药”&#xff09;作为一家专注于创新…

汽车低频发射天线介绍

汽车低频PKE天线是基于RFID技术的深度研究及产品开发应用的一种天线&#xff0c;在汽车的智能系统中发挥着重要作用&#xff0c;以下是关于它的详细介绍&#xff1a; 移动管家PKE低频天线结构与原理 结构&#xff1a;产品一般由一个高Q值磁棒天线和一个高压电容组成&#xff…

Java 大视界 -- Java 大数据分布式文件系统的性能调优实战(101)

&#x1f496;亲爱的朋友们&#xff0c;热烈欢迎来到 青云交的博客&#xff01;能与诸位在此相逢&#xff0c;我倍感荣幸。在这飞速更迭的时代&#xff0c;我们都渴望一方心灵净土&#xff0c;而 我的博客 正是这样温暖的所在。这里为你呈上趣味与实用兼具的知识&#xff0c;也…

全国普通高等学校名单

全国普通高等学校名单 全国普通高等院校&#xff0c;简称“高校”&#xff0c;是指那些提供高等教育的学校&#xff0c;涵盖了大学、独立学院、高等专科学校以及高等职业学校等多种类型。这些机构通过国家普通高等教育招生考试&#xff0c;主要招收高中毕业生&#xff0c;并为…

Vue.js 学习笔记

文章目录 前言一、Vue.js 基础概念1.1 Vue.js 简介1.2 Vue.js 的特点1.3 Vue.js 基础示例 二、Vue.js 常用指令2.1 双向数据绑定&#xff08;v-model&#xff09;2.2 条件渲染&#xff08;v-if 和 v-show&#xff09;2.3 列表渲染&#xff08;v-for&#xff09;2.4 事件处理&am…

【Python】基础语法三

> 作者&#xff1a;დ旧言~ > 座右铭&#xff1a;松树千年终是朽&#xff0c;槿花一日自为荣。 > 目标&#xff1a;了解Python的函数、列表和数组。 > 毒鸡汤&#xff1a;有些事情&#xff0c;总是不明白&#xff0c;所以我不会坚持。早安! > 专栏选自&#xff…

传奇3光通版手游行会战攻略:团队协作与战术布局详解

戳一戳&#xff1b;了解更多 在《传奇3光通版》手游中&#xff0c;行会战是玩家们展现团队协作与战术布局的重要舞台。下面&#xff0c;我们就来详细解析一下行会战中的团队协作与战术布局攻略。 一、团队协作 ​职业搭配 在行会战中&#xff0c;合理的职业搭配至关重要。一般…

unity学习56:旧版legacy和新版TMP文本输入框 InputField学习

目录 1 旧版文本输入框 legacy InputField 1.1 新建一个文本输入框 1.2 InputField 的子物体构成 1.3 input field的的component 1.4 input Field的属性 2 过渡 transition 3 控件导航 navigation 4 占位文本 placeholder 5 文本 text 5.1 文本内容&#xff0c;用户…

99分巧克力

99分巧克力 ⭐️难度&#xff1a;中等 &#x1f31f;考点&#xff1a;二分 2017省赛真题 &#x1f4d6; &#x1f4da; import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc new Scanner(System.in);int n sc.nextInt();i…

Python 基础知识全面总结

Python 是一种广泛应用的编程语言&#xff0c;具有简洁、易读、功能强大等特点。本文将对 Python 的基础知识进行全面梳理&#xff0c;涵盖从入门必备知识到各类模块和编程概念等内容。 一、Python基础语法 &#xff08;一&#xff09;标识符 定义&#xff1a;用于给变量、函…

7.1.1 计算机网络的组成

文章目录 物理组成功能组成工作方式完整导图 物理组成 计算机网络是将分布在不同地域的计算机组织成系统&#xff0c;便于相互之间资源共享、传递信息。 计算机网络的物理组成包括硬件和软件。硬件中包含主机、前端处理器、连接设备、通信线路。软件中包含协议和应用软件。 功…

领域驱动设计:事件溯源架构简介

概述 事件溯源架构通常由3种应用设计模式组成,分别是:事件驱动(Event Driven),事件溯源(Event Source)、CQRS(读写分离)。这三种应用设计模式常见于领域驱动设计(DDD)中,但它们本身是一种应用设计的思想,不仅仅局限于DDD,每一种模式都可以单独拿出来使用。 E…