zynq使用简单I/O对Flash进行读写测试

硬件环境:ALINX 7020
ZYNQ的QSPI Flash 控制器有以下三种模式:I/O 模式、线性地址模式,以及传统 SPI 模式。

I/O模式

操作特点:在I/O模式下,软件模拟去实现 Flash 器件的通信协议。软件需要将 Flash 命令和数据写到控制器中的 TXD寄存器中,然后将接收到的数据从 RXD 寄存器中读出。软件与闪存设备协议紧密交互,命令、地址和数据都需要根据SPI Flash的数据手册规定,由用户软件组织并写入FIFO中。QSPI控制器负责将这些数据串行化后通过总线发出。
应用场景:这种模式适合对Flash操作有高级控制需求的情况,如需要优化命令序列或处理复杂的读写操作。

线性地址模式

操作特点:在线性地址模式下,QSPI控制器使用AXI接口进行数据交互,可以无需软件开销地读取Flash,且能够支持高达32MB的线性地址空间。这一模式下,数据传输更为高效,尤其在读取大量数据时。但是该模式只支持读操作,不支持写操作。
应用场景:适合于数据密集型应用,如需要快速读取大型数据文件或代码库。

传统SPI模式

操作特点:在传统SPI模式下,QSPI控制器操作如同一个标准的SPI控制器,与一个或两个闪存设备接口,支持单个从器件模式、双从器件并行模式和双从器件堆叠模式。这种模式简化了电路设计,降低了系统成本。
应用场景:适用于对传输速度要求不高,但需要简化硬件设计的场合。

QSPI系统框图
由系统框图可知,flash控制器通过MIO和Flash器件相连接,可以支持单个从器件,双从器件并行和双从器件堆模式。有两种类型的接口:AXI 接口和 APB 接口。其中 AXI 接口用于线性地址模式,而 APB 接口用于 I/O 模式。

W25Q256FV操作框图
在 I/O 模式下,软件需要把命令和数据转化成 QSPI Flash 协议下的指令,转换之后的指令将被写入 Tx FIFO。然后发送逻辑将 Tx FIFO 中的内容按照 QSPI 接口规范进行并串转换,最后通过 MIO 将转换后的数据送到 Flash 存储器中。在发送逻辑将 Tx FIFO 中的数据发送出去的同时,接收逻辑会采样所发送的串行数据,进行串并转换后存储到 Rx FIFO 里面。

QSPI FLASH 控制器功能框图


#include "xparameters.h"	/* SDK generated parameters */
#include "xqspips.h"		/* QSPI device driver */
#include "xil_printf.h"#define QSPI_DEVICE_ID		XPAR_XQSPIPS_0_DEVICE_ID//发送到FLASH器件的指令
#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//FLASH BUFFER中各数据的偏移量
#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 reads#define DUMMY_SIZE			1 // Number of dummy bytes for 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 // control information: command and address#define SECTOR_SIZE			0x10000
#define NUM_SECTORS			0x100
#define NUM_PAGES			0x10000
#define PAGE_SIZE			256/* Number of flash pages to be written.*/
#define PAGE_COUNT		16/* Flash address to which data is to be written.*/
#define TEST_ADDRESS	0x00055000
#define UNIQUE_VALUE	0x05#define MAX_DATA		(PAGE_COUNT * PAGE_SIZE)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(void);
void FlashQuadEnable(XQspiPs *QspiPtr);
int  QspiFlashPolledExample(XQspiPs *QspiInstancePtr, u16 QspiDeviceId);static XQspiPs QspiInstance;int Test = 5;u8 ReadBuffer[MAX_DATA + DATA_OFFSET + DUMMY_SIZE];
u8 WriteBuffer[PAGE_SIZE + DATA_OFFSET];int main(void)
{int Status;xil_printf("QSPI FLASH Polled Example Test \r\n");/* Run the Qspi Interrupt example.*/Status = QspiFlashPolledExample(&QspiInstance, QSPI_DEVICE_ID);if (Status != XST_SUCCESS) {xil_printf("QSPI FLASH Polled Example Test Failed\r\n");return XST_FAILURE;}xil_printf("Successfully ran QSPI FLASH Polled Example Test\r\n");return XST_SUCCESS;
}int QspiFlashPolledExample(XQspiPs *QspiInstancePtr, u16 QspiDeviceId)
{int Status;u8 *BufferPtr;u8 UniqueValue;int Count;int Page;XQspiPs_Config *QspiConfig;//初始化QSPI驱动QspiConfig = XQspiPs_LookupConfig(QspiDeviceId);XQspiPs_CfgInitialize(QspiInstancePtr, QspiConfig, QspiConfig->BaseAddress);//初始化读写BUFFERfor (UniqueValue = UNIQUE_VALUE, Count = 0; Count < PAGE_SIZE;Count++, UniqueValue++) {WriteBuffer[DATA_OFFSET + Count] = (u8)(UniqueValue + Test);}memset(ReadBuffer, 0x00, sizeof(ReadBuffer));//设置手动启动和手动片选模式XQspiPs_SetOptions(QspiInstancePtr, XQSPIPS_MANUAL_START_OPTION |XQSPIPS_FORCE_SSELECT_OPTION |XQSPIPS_HOLD_B_DRIVE_OPTION);//设置QSPI时钟的分频系数XQspiPs_SetClkPrescaler(QspiInstancePtr, XQSPIPS_CLK_PRESCALE_8);//片选信号置为有效XQspiPs_SetSlaveSelect(QspiInstancePtr);//读FLASH IDFlashReadID();//使能FLASH Quad模式FlashQuadEnable(QspiInstancePtr);//擦除FLASHFlashErase(QspiInstancePtr, TEST_ADDRESS, MAX_DATA);//向FLASH中写入数据for (Page = 0; Page < PAGE_COUNT; Page++) {FlashWrite(QspiInstancePtr, (Page * PAGE_SIZE) + TEST_ADDRESS,PAGE_SIZE, WRITE_CMD);}//使用QUAD模式从FLASH中读出数据FlashRead(QspiInstancePtr, TEST_ADDRESS, MAX_DATA, QUAD_READ_CMD);//对比写入FLASH与从FLASH中读出的数据BufferPtr = &ReadBuffer[DATA_OFFSET + DUMMY_SIZE];for (UniqueValue = UNIQUE_VALUE, Count = 0; Count < MAX_DATA;Count++, UniqueValue++) {if (BufferPtr[Count] != (u8)(UniqueValue + Test)) {return XST_FAILURE;}}return XST_SUCCESS;
}/*****************************************************************************/
/**
*
* This function writes to the  serial FLASH connected to the QSPI interface.
* All the data put into the buffer must be in the same page of the device with
* page boundaries being on 256 byte boundaries.
*
* @param	QspiPtr is a pointer to the QSPI driver component to use.
* @param	Address contains the address to write data to in the FLASH.
* @param	ByteCount contains the number of bytes to write.
* @param	Command is the command used to write data to the flash. QSPI
*		device supports only Page Program command to write data to the
*		flash.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
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;}}
}/*****************************************************************************/
/**
*
* This function reads from the  serial FLASH connected to the
* QSPI interface.
*
* @param	QspiPtr is a pointer to the QSPI driver component to use.
* @param	Address contains the address to read data from in the FLASH.
* @param	ByteCount contains the number of bytes to read.
* @param	Command is the command used to read data from the flash. QSPI
*		device supports one of the Read, Fast Read, Dual Read and Fast
*		Read commands to read data from the flash.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
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);
}/*****************************************************************************/
/**
*
* This function erases the sectors in the  serial FLASH connected to the
* QSPI interface.
*
* @param	QspiPtr is a pointer to the QSPI driver component to use.
* @param	Address contains the address of the first sector which needs to
*		be erased.
* @param	ByteCount contains the total size to be erased.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
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;}
}/*****************************************************************************/
/**
*
* This function reads serial FLASH ID connected to the SPI interface.
*
* @param	None.
*
* @return	XST_SUCCESS if read id, otherwise XST_FAILURE.
*
* @note		None.
*
******************************************************************************/
int FlashReadID(void)
{int Status;/* Read ID in Auto mode.*/WriteBuffer[COMMAND_OFFSET]   = READ_ID;WriteBuffer[ADDRESS_1_OFFSET] = 0x23;		/* 3 dummy bytes */WriteBuffer[ADDRESS_2_OFFSET] = 0x08;WriteBuffer[ADDRESS_3_OFFSET] = 0x09;Status = XQspiPs_PolledTransfer(&QspiInstance, WriteBuffer, ReadBuffer,RD_ID_SIZE);if (Status != XST_SUCCESS) {return XST_FAILURE;}xil_printf("FlashID=0x%x 0x%x 0x%x\n\r", ReadBuffer[1], ReadBuffer[2],ReadBuffer[3]);return XST_SUCCESS;
}/*****************************************************************************//**** This function enables quad mode in the serial flash connected to the* SPI interface.** @param	QspiPtr is a pointer to the QSPI driver component to use.** @return	None.** @note		None.*******************************************************************************/
void FlashQuadEnable(XQspiPs *QspiPtr)
{u8 WriteEnableCmd = {WRITE_ENABLE_CMD};u8 ReadStatusCmd[] = {READ_STATUS_CMD, 0};u8 QuadEnableCmd[] = {WRITE_STATUS_CMD, 0};u8 FlashStatus[2];if (ReadBuffer[1] == 0x9D) {XQspiPs_PolledTransfer(QspiPtr, ReadStatusCmd,FlashStatus,sizeof(ReadStatusCmd));QuadEnableCmd[1] = FlashStatus[1] | 1 << 6;XQspiPs_PolledTransfer(QspiPtr, &WriteEnableCmd, NULL,sizeof(WriteEnableCmd));XQspiPs_PolledTransfer(QspiPtr, QuadEnableCmd, NULL,sizeof(QuadEnableCmd));}
}

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

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

相关文章

【深度学习入门篇 ②】Pytorch完成线性回归!

&#x1f34a;嗨&#xff0c;大家好&#xff0c;我是小森( &#xfe61;ˆoˆ&#xfe61; )&#xff01; 易编橙终身成长社群创始团队嘉宾&#xff0c;橙似锦计划领衔成员、阿里云专家博主、腾讯云内容共创官、CSDN人工智能领域优质创作者 。 易编橙&#xff1a;一个帮助编程小…

二四、3d人脸构建

一、下载github项目3dmm_cnn-master https://github.com/anhttran/3dmm_cnn.git 一个使用深度神经网络从单个图像进行 3D 人脸建模的项目,端到端代码,可直接根据图像强度进行 3D 形状和纹理估计;使用回归的 3D 面部模型,从检测到的面部特征点估计头部姿势和表情。…

STM32中断学习记录

文章目录 NVICNVIC是什么NVIC寄存器NVIC 结构体NVIC 相关固件库函数 如何定义优先级中断编程外部中断 EXTIEXIT 外部中断/事件控制器EXIT的使用EXTI内部寄存器分析GPIO触发中断例程为什么中断后要清除中断标志位 SysTick的使用SysTick分析 NVIC NVIC是什么 待补充.........NVI…

Docker安装HomeAssistant

检查Docker服务是否正常运行&#xff0c;确保Docker正常运行。 systemctl status docker#输出---------------------- docker.service - Docker Application Container EngineLoaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)Activ…

旗晟智能巡检机器人:开启工业运维的智能化新篇章

在当今快速发展的工业领域&#xff0c;安全、效率和成本控制是企业运营的核心。旗晟科技以创新为驱动&#xff0c;推出了一站式的工业级智能巡检机器人数字化全景运维解决方案&#xff0c;为石油、天然气、化工、电力等高危行业提供了一个全新的运维模式。 一、面对挑战&#x…

人工智能算法工程师(中级)课程3-sklearn机器学习之数据处理与代码详解

大家好&#xff0c;我是微学AI,今天给大家分享一下人工智能算法工程师(中级)课程3-sklearn机器学习之数据处理与代码详解。 Sklearn&#xff08;Scikit-learn&#xff09;是一个基于Python的开源机器学习库&#xff0c;它提供了简单有效的数据挖掘和数据分析工具。Sklearn包含了…

动手学深度学习(Pytorch版)代码实践 -循环神经网络-57长短期记忆网络(LSTM)

57长短期记忆网络&#xff08;LSTM&#xff09; 1.LSTM原理 LSTM是专为解决标准RNN的长时依赖问题而设计的。标准RNN在训练过程中&#xff0c;随着时间步的增加&#xff0c;梯度可能会消失或爆炸&#xff0c;导致模型难以学习和记忆长时间间隔的信息。LSTM通过引入一组称为门…

碾压SOTA!最新视觉SLAM:渲染速度提升176倍,内存占用减少150%

视觉SLAM&#xff0c;一种结合了CV与机器人技术的先进方法。与激光SLAM相比&#xff0c;它成本低廉且信息量大&#xff0c;易于安装&#xff0c;拥有更优秀的场景识别能力&#xff0c;因此在自动驾驶等许多场景上都非常适用&#xff0c;是学术界与工业界共同关注的热门研究方向…

如何将heic格式转换jpg?四种将heic转换成jpg的方法!

如何将heic格式转换jpg&#xff1f;在现今的数字图像处理领域&#xff0c;Heic格式作为一种被吹捧的创新型图像格式&#xff0c;以其先进的压缩技术&#xff0c;迅速减小了图片文件的大小&#xff0c;然而&#xff0c;尽管其有许多优点&#xff0c;实际使用中Heic格式却带来了一…

RSA加密算法因N强度不足破解实例

已知如下RSA密文和公钥信息&#xff0c;要求解密得到明文。 ----------------------- ciphertext&#xff08;HEX&#xff09; 94808F954A8AF9B9 N&#xff08;HEX&#xff09; C6EAD137492B4631 e&#xff08;HEX&#xff09; 10001 ------------------------ 分析过…

【Linux】命令执行的判断依据:;,,||

在某些情况下&#xff0c;很多命令我想要一次输入去执行&#xff0c;而不想要分次执行时&#xff0c;该如何是好&#xff1f; 基本上有两个选择&#xff0c; 一个是通过shell脚本脚本去执行&#xff0c;一种则是通过下面的介绍来一次入多个命令。 1.cmd&#xff1a;cmd&#…

【Android】基于 LocationManager 原生实现定位打卡

目录 前言一、实现效果二、定位原理三、具体实现1. 获取权限2. 页面绘制3. 获取经纬度4. 方法调用5. 坐标转换6. 距离计算7. 完整代码 前言 最近公司有个新需求&#xff0c;想要用定位进行考勤打卡&#xff0c;在距离打卡地一定范围内才可以进行打卡。本文将借鉴 RxTool 的 Rx…

buuctf面具下的flag

细节: 这道题可能因为是vmdk的原因 导致在window上 7z无法得到全部的信息 所以最后解压要在linux系统上 解密网站 Brainfuck/Ook! Obfuscation/Encoding [splitbrain.org] 这道题010打开,可以发现里面隐藏了很多 binwalk解压 两个文件 vmdk可以直接 用7z解压 7z x flag.…

常用网络概念

&#x1f4d1;打牌 &#xff1a; da pai ge的个人主页 &#x1f324;️个人专栏 &#xff1a; da pai ge的博客专栏 ☁️宝剑锋从磨砺出&#xff0c;梅花香自苦寒来 ​​ 目录 了解组织 局域网技术 …

20240711 每日AI必读资讯

&#x1f3a8;Runway Gen-3 Alpha 详细使用教程以及提示词指南大全 - 7月9日&#xff0c;著名生成式AI平台Runway在官网公布了&#xff0c;最新发布的文生视频模型Gen-3 Alpha的文本提示教程。 - 从技术层面来说&#xff0c;输入的文本提示会被转换成“向量”&#xff0c;这些…

怎么提高音频声音大小?提高音频声音大小的四种方法

怎么提高音频声音大小&#xff1f;在音频处理和编辑中&#xff0c;增加声音的音量是一个常见的需求&#xff0c;尤其是在确保音频清晰度和听觉效果的同时。调整音频的音量不仅仅是简单地提高音频的响度&#xff0c;它也涉及到如何保持音质的高标准&#xff0c;确保没有失真或削…

如何写好品牌宣传稿提升品牌曝光?看这篇文章就够了

在这个信息爆炸的时代&#xff0c;一句精炼而富有力量的宣传语&#xff0c;足以让品牌在万千竞争者中脱颖而出。撰写一篇成功的品牌宣传稿&#xff0c;不仅是对文字艺术的驾驭&#xff0c;也是对品牌灵魂的深刻洞察与精准传达&#xff0c;更是连接品牌与消费者情感与认知的桥梁…

怎样将aac转换mp3格式?推荐四个aac转MP3的方法

怎样将aac转换mp3格式&#xff1f;当需要将aac格式音频转换为MP3格式时&#xff0c;有几种方法可以轻松实现这一目标。MP3是一种广泛支持的音频格式&#xff0c;几乎所有设备和平台都能播放MP3文件&#xff0c;包括各种音乐播放器、手机、平板电脑和汽车音响系统。而且它也提供…

实习记录3

1.Mybaits懒加载 MyBatis 延迟加载&#xff08;懒加载&#xff09;一篇入门-腾讯云开发者社区-腾讯云 (tencent.com) 2.高级映射 106-高级映射之多对一映射第一种方式_哔哩哔哩_bilibili 3.TableId(type IdType.INPUT) Mybatis-plus 主键生成策略_mybatis-plus 自增主键等于…

使用PEFT库进行ChatGLM3-6B模型的QLORA高效微调

PEFT库进行ChatGLM3-6B模型QLORA高效微调 QLORA微调ChatGLM3-6B模型安装相关库使用ChatGLM3-6B模型GPU显存占用准备数据集加载数据集数据处理数据集处理加载量化模型-4bit预处理量化模型配置LoRA适配器训练超参数配置开始训练保存LoRA模型模型推理合并模型使用微调后的模型 QLO…