2012年8月31日 星期五
Xilinx 外掛的Flash,腳位要設定嗎?
今天突然想到一個問題,如果要燒錄mcs file(fpga code for flash)的話,在top裏頭需不需要宣告flash的腳位?像是spi_clk, spi_miso, spi_mosi, spi_ss等等?似乎是不用~
2012年8月30日 星期四
microblaze-客製化SPI module
0.標準SPI有五根腳位(xilinx), MISO,MOSI,CLK,CS,SPISEL
1. 若是用Wizard增加SPI的話,只能增加一個,要是有多個 SPI需求的話,則必須要透過IP catalog慢慢新增。
然而,發現會多一根pin叫做SPISEL,若是採用SP605 package方式的話,並不會有該 pin,所以可能因為目前的project是一項項新增周邊,而XPS不曉得該SPI是master or slave所以放上了slave所特有的spisel 腳位。
若是master則必須在net選項中,選擇net vcc,也就是pull high,並且delete SPISEL此external port
若是slave則必須使其成為external port並且接到master的cs
2. 必須初始化,找出當下的旗標位置
example:
XSpi * spiptr
1. 若是用Wizard增加SPI的話,只能增加一個,要是有多個 SPI需求的話,則必須要透過IP catalog慢慢新增。
然而,發現會多一根pin叫做SPISEL,若是採用SP605 package方式的話,並不會有該 pin,所以可能因為目前的project是一項項新增周邊,而XPS不曉得該SPI是master or slave所以放上了slave所特有的spisel 腳位。
若是master則必須在net選項中,選擇net vcc,也就是pull high,並且delete SPISEL此external port
若是slave則必須使其成為external port並且接到master的cs
2. 必須初始化,找出當下的旗標位置
example:
XSpi * spiptr
2012年8月20日 星期一
xilinx verilog 寫法
當一個模組的reset是採用另一個模組的rdy(或其他訊號)時,進行behavior simulation會極慢!
所以最好還是採用global reset的設計。
所以最好還是採用global reset的設計。
2012年8月19日 星期日
Verilog 檔案處理
integer file_handle; //file_handle自取
file_handle=$fopen("file_name");//file_name自取
$fwrite=(file_handle,"%b\n ", dout);
//%b or %h 看想使用者想儲存甚麼樣子的資料格式,而dout是使用者想要儲存的資料
$fclose(file_handle);
file_handle=$fopen("file_name");//file_name自取
$fwrite=(file_handle,"%b\n ", dout);
//%b or %h 看想使用者想儲存甚麼樣子的資料格式,而dout是使用者想要儲存的資料
$fclose(file_handle);
2012年8月13日 星期一
Xilinx Microblaze (1) -- 流程
Xilinx將MicroBlaze的使用流程做滿大的改變,以前的書已經無法勝任,除了使用流程改變、檔案產生的位置改變以外,最重要的是現在Xilinx主要架構是AXI(Arm Xilinx Interface)/AXI-Lite匯流排架構,不是過去的PLB(待查)。
1. 打開ISE,新增new source 新增一個Embedded Processor
2.進入Xilinx Platform Studio(XPS)透過wizard 設定所需的IP,此XPS產生兩個重要的file: MHS(Microprocessor Hardware Specification) file & UCF(User Constraints File) file,回到ISE
3.copy ucf 檔到project中,generate top HDL source
4.在embedded processor 中點選 Export Hardware Design To SDK with bitstream,
會開始synthesis->translate->MAP->P&R自動打開SDK 開始進行軟體工程
ELF file:在SDK中,進行編譯過的application(意即,經過編譯的C/C++)
1. 打開ISE,新增new source 新增一個Embedded Processor
2.進入Xilinx Platform Studio(XPS)透過wizard 設定所需的IP,此XPS產生兩個重要的file: MHS(Microprocessor Hardware Specification) file & UCF(User Constraints File) file,回到ISE
3.copy ucf 檔到project中,generate top HDL source
4.在embedded processor 中點選 Export Hardware Design To SDK with bitstream,
會開始synthesis->translate->MAP->P&R自動打開SDK 開始進行軟體工程
ELF file:在SDK中,進行編譯過的application(意即,經過編譯的C/C++)
Xilinx 給ngc
除了synthesis的選項中,IO buf 以及 bufg為零以外,還必須將相關IP 的ngc一起給,最後,製作一個.v file
module xxx {
input a,
input b,
output [1:0] c
}
endmodule
module xxx {
input a,
input b,
output [1:0] c
}
endmodule
訂閱:
文章 (Atom)