完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我的代码文件写入操作被复制到下面。请看代码。如果有任何问题请告诉我。我在这些变量中获取数据,如image_s&amp; image_vld_s。 如果我删除了文件夹中的mac_data.dat文件,它也将在代码运行时创建。 但是这些数据没有写入文件。 - ********* ************************************************** *******************文件mac_data:文本打开write_mode是“D: Xilinx Mahesh_Project Sensor_Capture_Codes mac_data.dat”; - ******* ************************************************** ************************************************** ********** - 将像素数据写入“mac_data.txt”文件的过程 - *********************** ************************************************** ********************************************程序edg_data_write(信号rx_clk_int: 在std_logic中; - chsnged clk到rx_clk_int信号image_vld_s:在std_logic中; - 将pxl_vld_s更改为image_vld_s信号image_s:在std_logic_vector中(7 downto 0); - 将edge_signal_s更改为image_s信号op_array_s:out op_array_1; signal pix_cnt:out integer) 是变量index_s:integer:= 0;变量edg_sig:std_logic_vector(7 downto 0);变量pxl_line_wr:line;类型op_array是数组(0到((NO_OF_COLUMNS * NO_OF_ROWS)-1))o f整数; - ((NO_OF_COLUMNS * NO_OF_ROWS)-1))整数;变量op_array_v:op_array; begin --edg_sig:= edge_signal_s +“01111111”; 对于j in 0到(NO_OF_ROWS-1)循环等到image_vld_s ='1'; - 等到(rx_clk_int'event和rx_clk_int ='1'); for i in 0 to(NO_OF_COLUMNS-1)loop op_array_v(index_s):= conv_integer(image_s); - 将edge_signal_s更改为image_s op_array_s(index_s)index_s:= index_s + 1; pix_cnt等到(rx_clk_int'event和rx_clk_int ='1'); 结束循环; 结束循环; for i in 0 to((NO_OF_COLUMNS * NO_OF_ROWS)-1)循环写入(pxl_line_wr,op_array_v(i)); writeline(mac_data,pxl_line_wr); 等到rising_edge(rx_clk_int); 结束循环; 结束edg_data_write; - ********************************************* ************************************************** **************** 感谢你,Mahesh Hegde。 以上来自于谷歌翻译 以下为原文 Hi, My file writing operation of code is copied below.Please see the code.If any problems please tell me.I am getting the data in these variables like image_s & image_vld_s. If i deleted the mac_data.dat file in the folder also it ll be created when code is running. But these data is not writing into the file. --********************************************************************************************************************* file mac_data : text open write_mode is "D:XilinxMahesh_ProjectSensor_Capture_Codesmac_data.dat"; --********************************************************************************************************************* --procedure to write pixel data to the "mac_data.txt" file --********************************************************************************************************************* procedure edg_data_write ( signal rx_clk_int : in std_logic; -- chsnged clk to rx_clk_int signal image_vld_s : in std_logic; -- changed pxl_vld_s to image_vld_s signal image_s : in std_logic_vector(7 downto 0); -- changed edge_signal_s to image_s signal op_array_s : out op_array_1; signal pix_cnt : out integer ) is variable index_s : integer:=0; variable edg_sig : std_logic_vector(7 downto 0); variable pxl_line_wr: line; type op_array is array (0 to ((NO_OF_COLUMNS*NO_OF_ROWS)-1)) of integer;--((NO_OF_COLUMNS*NO_OF_ROWS)-1)) of integer; variable op_array_v : op_array; begin --edg_sig:=edge_signal_s+"01111111"; for j in 0 to (NO_OF_ROWS-1) loop wait until image_vld_s ='1'; -- wait until (rx_clk_int'event and rx_clk_int = '1'); for i in 0 to(NO_OF_COLUMNS-1) loop op_array_v(index_s):= conv_integer(image_s); -- changed edge_signal_s to image_s op_array_s(index_s)<= conv_integer(image_s); -- changed edge_signal_s to image_s index_s := index_s+1; pix_cnt <=index_s; wait until (rx_clk_int'event and rx_clk_int = '1'); end loop; end loop; for i in 0 to ((NO_OF_COLUMNS*NO_OF_ROWS)-1) loop write(pxl_line_wr, op_array_v(i)); writeline(mac_data, pxl_line_wr); wait until rising_edge(rx_clk_int); end loop; end edg_data_write; --*************************************************************************************************************** Thanks You in Advance, Mahesh Hegde. |
|
相关推荐
8个回答
|
|
这个运行的模拟器是什么?
------------------------------------------“如果它不起作用 模拟,它不会在板上工作。“ 以上来自于谷歌翻译 以下为原文 Which simulator is this running in? ------------------------------------------ "If it don't work in simulation, it won't work on the board." |
|
|
|
|
|
|
|
只是一个建议:
尝试从输出文件名中删除路径,然后改为“mac_data.dat”。 我删除了路径名中的Windows样式反斜杠问题 从字符串。 另一种可能性是将所有反斜杠(“”)更改为正常 斜杠(“/”)并查看是否有帮助。 - Gabor - Gabor 以上来自于谷歌翻译 以下为原文 Just a suggestion: Try removing the path from your output file name and just make it "mac_data.dat" instead. I have had problems with the Windows-style backslashes in path-names being removed from strings. The other possibility is to change all of the backslashes ("") to normal slashes ("/") and see if that helps. -- Gabor -- Gabor |
|
|
|
嗨,
我使用了这个路径名,因为我在modelsim中使用ISIM.Earlier这个路径名不是必需的。在我的test_bench文件读取操作中我也有。这个路径约定工作正常。“D: Xilinx Mahesh_Project Sensor_Capture_Codes grey_data .DAT”。 所以我认为这个路径名也是文件写操作所必需的。 感谢你,Mahesh Hegde。 以上来自于谷歌翻译 以下为原文 Hi, I used this path name because am using ISIM.Earlier in modelsim this path name was not required.In my test_bench file reading operation also i had.That is working fine with this path convention."D:XilinxMahesh_ProjectSensor_Capture_Codesgrey_data.dat". So i am thinking that this path name is required for file writing operation also. Thanks You in Advance, Mahesh Hegde. |
|
|
|
嗨,
我在文件编写操作中使用了一些变量,如index_s,pxl_line_wr和op_array_v。如何在ISIM模拟器中将这些变量添加到我的波形窗口中。我无法做到这一点。我的感觉是,如果我能够添加这些变量是 我可以看到geeting数据。请告诉我方式。 感谢你,Mahesh Hegde。 以上来自于谷歌翻译 以下为原文 Hi, I have used some variables like index_s,pxl_line_wr&op_array_v in my file writing operation.How to add these variables into my waveform window in ISIM simulator.I am not able to do this.My feeling is if i able to add wether these varibles are geeting data i can see.Please tell me the way. Thanks You in Advance, Mahesh Hegde. |
|
|
|
嗨,
我得到了文件写入操作的解决方案。感谢您的帮助和合作。 感谢你,Mahesh Hegde。 以上来自于谷歌翻译 以下为原文 Hi, I got the solution for file writing operation.Thanks for your help and co-operation. Thanks You in Advance, Mahesh Hegde. |
|
|
|
我会说“谢谢分享”,但你没有。
------------------------------------------“如果它不起作用 模拟,它不会在板上工作。“ 以上来自于谷歌翻译 以下为原文 I would say "thank you for sharing", but you haven't. ------------------------------------------ "If it don't work in simulation, it won't work on the board." |
|
|
|
嗨rcingham,
你错了我。实际上我得到了我发布的问题的解决方案,因为“我得到了结果”。对于我的一些问题,我现在还没有得到解决方案。现在我也没有工作。如果我得到了 这个解决方案也可以通知。 感谢你,Mahesh Hegde。 以上来自于谷歌翻译 以下为原文 Hi rcingham, You mistaken me.Actually wahtever i got the solution for the question i posted as "i got the result".For some of my question i didn't got the solution still now.Right now am not working on that also.If i got the solution for that definetly inform also. Thanks You in Advance, Mahesh Hegde. |
|
|
|
只有小组成员才能发言,加入小组>>
2164 浏览 7 评论
2607 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2080 浏览 9 评论
3152 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2196 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
425浏览 1评论
1526浏览 1评论
在使用xc5vsx95T时JTAG扫片不成功,测量TDO无信号输出
2178浏览 0评论
511浏览 0评论
1644浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-26 11:22 , Processed in 1.325775 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号