当前位置: 首页 > wzjs >正文

同城手机网站开发在线优化工具

同城手机网站开发,在线优化工具,wordpress页面标题居中,wordpress 上传图片接口使用FPGA进行图像处理时,通常需要将TXT文件中的图像数据读出到TestBench中,并将仿真的结果写入到TXT文件中,用于确认图像处理的结果是否正确。 VHDL中TXT文件的读写操作如下所示, --------------------------------------------…

使用FPGA进行图像处理时,通常需要将TXT文件中的图像数据读出到TestBench中,并将仿真的结果写入到TXT文件中,用于确认图像处理的结果是否正确。

VHDL中TXT文件的读写操作如下所示,

----------------------------------------------------------------------------------
-- Company: 
-- Engineer: 
-- 
-- Create Date: 2025/04/18 21:34:38
-- Design Name: 
-- Module Name: tb_txt_rdwr - Behavioral
-- Project Name: 
-- Target Devices: 
-- Tool Versions: 
-- Description: 
-- 
-- Dependencies: 
-- 
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
-- 
----------------------------------------------------------------------------------library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_textio.all;
use std.textio.all;-- testio程序包是std库的一部分-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;entity tb_txt_rdwr is
--  Port ( );
end tb_txt_rdwr;architecture Behavioral of tb_txt_rdwr isconstant clk_period : time := 10 ns; signal clk : std_logic;
signal rst : std_logic;signal wrdata : std_logic_vector(3 downto 0);
signal wren : std_logic;
signal wrdone : std_logic;signal rddata : std_logic_vector(3 downto 0);
signal rden : std_logic;
signal rddone : std_logic;begin-----------------------------------
--生成时钟复位信号
process
beginclk <= '0'; wait for clk_period/2;clk <= '1'; wait for clk_period/2;
end process;process
beginrst <= '1';wait for clk_period*200;rst <= '0';wait ;
end process;-----------------------------------
--生成要写入TXT文件中的二进制数据
process
beginwrdata <= (others=>'0');wren <= '0';wrdone <= '0';wait until falling_edge(rst);wait until rising_edge(clk);wait until rising_edge(clk);wait until rising_edge(clk);for i in 15 downto 0 loop   wren <= '1';wait until rising_edge(clk);wrdata <= wrdata + x"1";end loop;wren <= '0';  wait until rising_edge(clk);wait until rising_edge(clk);wait until rising_edge(clk);  wrdone <= '1';wait until rising_edge(clk);wrdone <= '0';wait ;
end process;-----------------------------------
--写数据到TXT文件中
process(clk,rst)file v_file : text;variable v_line : line;variable v_data : std_logic_vector(3 downto 0);
beginif rst='1' thenfile_open(v_file,"E:\forsim\txt_from_vhdl_tb.txt",write_mode);elsif rising_edge(clk) thenif wren='1' thenv_data := wrdata;write(v_line,v_data);writeline(v_file,v_line);elsif wrdone='1' thenfile_close(v_file);end if;end if;
end process;-----------------------------------
--生成TXT文件的读使能信号和读结束信号
process
beginrden <= '0';rddone <= '0';wait until falling_edge(wrdone); --检测到TXT文件写操作结束后,从TXT文件中读出写入的数据wait until rising_edge(clk);wait until rising_edge(clk);wait until rising_edge(clk);for i in 15 downto 0 loop   rden <= '1';wait until rising_edge(clk);end loop;rden <= '0';wait until rising_edge(clk);wait until rising_edge(clk);wait until rising_edge(clk);rddone <= '1';wait until rising_edge(clk);rddone <= '0';wait ;
end process;-----------------------------------
--从TXT文件中读出数据,并赋值到rdtata
process(clk,rst)file v_file : text;variable v_line : line;variable v_data : std_logic_vector(3 downto 0);
beginif rst='1' thenfile_open(v_file,"E:\forsim\txt_from_vhdl_tb.txt",read_mode);rddata <= (others=>'0');elsif rising_edge(clk) thenif rden='1' thenreadline(v_file,v_line);read(v_line,v_data);rddata <= v_data;elsif rddone='1' thenfile_close(v_file);end if;end if;
end process;end Behavioral;

http://www.dtcms.com/wzjs/496040.html

相关文章:

  • 找网站建设上海百度推广公司排名
  • 做网站文案用哪个软件seo推广具体做什么
  • 广州制作网站巢湖seo推广
  • 又拍云wordpress全站cdn西安网站seo厂家
  • 制作动态网站模板作业网页广告调词平台多少钱
  • 新手做站必看 手把手教你做网站培训网站有哪些
  • 营销网站排行昆明排名优化
  • 阿里云快速备份网站人民政府网站
  • 博彩类网站开发源代码百度竞价关键词质量度怎么提升
  • wordpress 新页面网络网站推广优化
  • 常熟有做网站的网络公司吗高端网站定制设计
  • 几百的网站windows优化大师官方免费
  • 潍坊网站制作价格谷歌浏览器下载
  • 装饰网站建设的方案ppt专业百度seo排名优化
  • 网站建设维护的相关基础知识游戏推广代理
  • 公司网站留言板下载百度app免费下载安装
  • 做网站的软件是哪个seo服务外包客服
  • 网站开发公司气氛最近疫情最新消息
  • 登陆国外的网站要这么做seo外包是什么意思
  • 有没有专门做桑拿的网站呀武汉java培训机构排名榜
  • 网页设计怎么建站点百度入口官网
  • 招聘网站怎么做介绍优化的近义词
  • 经营性网站备案上海百度手机浏览器
  • excel表如何做网站连接提升网站权重的方法
  • 天津建设工程信息网怎么投标系统优化的例子
  • 网站首页设计排版要点网址网域ip地址查询
  • 人跟狗做网站微博搜索引擎优化
  • wordpress怎么修改后台登录地址seo搜索优化邵阳
  • 浏览器不限制访问网站网络网站推广
  • 宝鸡企业网站建设2022最新免费的推广引流软件