资源简介
This is a report on the implementation of an oscilloscope on the DE2-35 FPGA development
kit for the Mini-Project as part of the ELEC5563 course. The basic functionality of an
oscilloscope i.e. sample an analogue signal and display it were the minimum requirements.
Additional features were suggested for additional marks. Apart from the minimum
requirements, more than half of the additional functionalities have been successfully
implemented along with other features which weren’t directly indicated.
代码片段和文件信息
close all
[filename pathname] = uigetfile( ...
{‘*.BMP;*.GIF;*.JPG;*.PNG;*.TIF‘‘All Graphics files (*.BMP*.GIF*.JPG*.PNG*.TIF)‘;
‘*.BMP‘ ‘Windows Bitmap files (*.BMP)‘; ...
‘*.GIF‘‘Graphics Interchange Format files (*.GIF)‘; ...
‘*.JPG;*.JPEG‘‘Joint Photographic Experts Group files (*.JPG*.JPEG)‘; ...
‘*.PNG‘‘Portable Network Graphics files (*.PNG)‘; ...
‘*.TIF;*.TIFF‘‘Tagged Image File Format files (*.TIF*.TIFF)‘; ...
‘*.*‘ ‘All Files (*.*)‘} ...
‘Pick a file‘);
image = imread([pathname filename]);
bits = 4;
A=image;
%Plot Image and RGB Separations
figure
subplot(221)
imagesc(A)
subplot(222)
red = A;
red(::2) = ones(size(red(::2)));
red(::3) = ones(size(red(::3)));
imagesc(red)
subplot(223)
green = A;
green(::1) = ones(size(green(::1)));
green(::3) = ones(size(green(::3)));
imagesc(green)
subplot(224)
blue = A;
blue(::1) = ones(size(blue(::1)));
blue(::2) = ones(size(blue(::2)));
imagesc(blue)
drawnow
dimension = size(image);
pic_width=dimension(2);
pic_height=dimension(1);
image = double(A);
A=zeros(120160);
[XY] = meshgrid(1:pic_width1:pic_height);
[XIYI] = meshgrid(1:(pic_width/160.1):pic_width1:(pic_height/120.1):pic_height);
A(::1) = interp2(XYimage(::1)XIYI‘spline‘);
A(::2) = interp2(XYimage(::2)XIYI‘spline‘);
A(::3) = interp2(XYimage(::3)XIYI‘spline‘);
A = uint8(A);
i=0;
dimension = size(A);
pic_width=dimension(2);
pic_height=dimension(1);
depth = pic_width*pic_height;
sampled = A;
fid = fopen(‘display.mif‘ ‘wt‘);
fprintf(fid ‘-- MatLab generated Memory Initialization File (.mif)\n‘);
fprintf(fid ‘\n‘);
fprintf(fid ‘WIDTH=%i;\n‘bits*3);
fprintf(fid ‘DEPTH=%i;\n\n‘depth);
fprintf(fid ‘ADDRESS_RADIX=UNS;\n‘);
fprintf(fid ‘DATA_RADIX=UNS;\n‘);
fprintf(fid ‘\n‘);
fprintf(fid ‘CONTENT BEGIN\n‘);
for h=1:pic_height
for w=1:pic_width
%Calculate HEX values for MIF data
R=dec2bin(A(hw1)8);
G=dec2bin(A(hw2)8);
B=dec2bin(A(hw3)8);
MIF = bin2dec([ ‘0‘ B(1:bits) G(1:bits) R(1:bits) ]);
sampled(hw1) = bin2dec( [ ‘0‘ R(1:bits) char(ones(18-bits)+48)]);
sampled(hw2) = bin2dec( [ ‘0‘ G(1:bits) char(ones(18-bits)+48)]);
sampled(hw3) = bin2dec( [ ‘0‘ B(1:bits) char(ones(18-bits)+48)]);
fprintf(fid ‘\t%i\t:\t%i;\n‘iMIF);
i=i+1;
end
end
fprintf(fid ‘END;\n‘);
fclose(fid);
%Plot Image and RGB Separations
figure
subplot(221)
imagesc(sampled)
subplot(222)
red = sampled;
red(::2) = ones(size(red(::2)));
red(::3) = ones(size(red(::3)));
imagesc(red)
subplot(223)
green = sampled;
green(::1) = ones(size(green(::1)));
green(::3) = ones(size(green(::3)));
imagesc(green)
subplot(224)
blue = sampled;
blue(::1) = ones(size(blue(::1)));
blue(::2) = ones(size(blue(::2)));
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-05-14 22:32 LCM_VGA\
文件 2484 2014-03-09 22:35 LCM_VGA\att.v
文件 2008 2014-03-09 22:35 LCM_VGA\attenuation.bsf
文件 1225 2014-03-09 22:35 LCM_VGA\attenuation.inc
文件 350 2014-03-09 22:35 LCM_VGA\Chain4.cdf
文件 2390 2014-03-09 22:35 LCM_VGA\compressor.bsf
文件 1822 2016-04-07 23:01 LCM_VGA\compressor.v
文件 367 2014-03-09 22:35 LCM_VGA\compressor.v.bak
目录 0 2016-05-14 23:30 LCM_VGA\db\
文件 3686 2014-03-09 22:35 LCM_VGA\db\altsyncram_0q14.tdf
文件 3721 2014-03-09 22:35 LCM_VGA\db\altsyncram_1q14.tdf
文件 3686 2014-03-09 22:35 LCM_VGA\db\altsyncram_2q14.tdf
文件 6409 2016-04-08 23:42 LCM_VGA\db\altsyncram_2r14.tdf
文件 12617 2016-04-01 13:25 LCM_VGA\db\altsyncram_40d1.tdf
文件 12617 2016-05-05 21:49 LCM_VGA\db\altsyncram_50d1.tdf
文件 92585 2016-03-07 19:19 LCM_VGA\db\altsyncram_5ca2.tdf
文件 45077 2014-03-09 22:35 LCM_VGA\db\altsyncram_8eq1.tdf
文件 3707 2014-03-09 22:35 LCM_VGA\db\altsyncram_8q14.tdf
文件 12535 2014-03-09 22:35 LCM_VGA\db\altsyncram_8rc1.tdf
文件 85677 2014-03-09 22:35 LCM_VGA\db\altsyncram_9eq1.tdf
文件 45077 2014-03-09 22:35 LCM_VGA\db\altsyncram_aeq1.tdf
文件 3699 2014-03-09 22:35 LCM_VGA\db\altsyncram_aq14.tdf
文件 20341 2016-04-08 22:39 LCM_VGA\db\altsyncram_au14.tdf
文件 15008 2016-05-05 23:19 LCM_VGA\db\altsyncram_bu14.tdf
文件 3667 2014-03-09 22:35 LCM_VGA\db\altsyncram_cs14.tdf
文件 21415 2016-04-08 23:45 LCM_VGA\db\altsyncram_cu14.tdf
文件 17210 2016-04-01 13:25 LCM_VGA\db\altsyncram_ddo1.tdf
文件 3719 2014-03-09 22:35 LCM_VGA\db\altsyncram_eq14.tdf
文件 17292 2016-04-23 17:48 LCM_VGA\db\altsyncram_fjo1.tdf
文件 69437 2014-03-09 22:35 LCM_VGA\db\altsyncram_geq1.tdf
文件 13880 2016-04-07 21:21 LCM_VGA\db\altsyncram_gr14.tdf
............此处省略4653个文件信息
相关资源
- 《FPGA应用开发入门与典型》文字版超
- 基于FPGA的视频采集系统
- FPGA cyclone4-handbook 数据手册
- 开源FPGA比特比挖矿
- 基于FPGA的单周期处理器设计MIPS指令集
- 黑金AX7102开发板Verilog教程.pdf
- 最全的FPGA俄罗斯方块包含5个版本的完
- 基于xapp1052pcie工程s6BMD.rar
- 谐波电能计量算法及其FPGA实现_毕明科
- [fpga][ax301][verilog]彩灯显示控制
- 基于FPGA的均值滤波本人上传所有资源
- 数字信号处理的FPGA实现第4版书内代码
- DE2-115资料
- Xilinx FPGA开发实用教程 第2版(完整版
- FPGA设计的实战演练 高级技巧篇.zip
- 米联的FPGA开发例程很详细
- 基于verilog的亮度jpeg压缩算法
- 米联客FPGA教程 Miz702.zip
- FPGA设计 基于团队的最佳实践
- CORDIC算法
- 双AD采集存储到SD卡
- 基于VHDL的FPGA和NiosII精炼--pdf 全
- FPGA 快速系统原型设计权威指南_1348
- Xilinx Zynq SoC与嵌入式Linux设计实战指南
- QuartusII时序约束方法
- 大西瓜FPGA开发板例程源码
- Xilinx FPGA应用进阶 通用IP核详解和设
- 基于FPGA的LED显示装置控制板的设计
- 《HELLO+FPGA》-+书籍合辑
-
FPGA Design: Best Practices for Team-ba
sed
评论
共有 条评论