vivado怎么写代码

1.vivado怎么用代码生成ipif (Request.Cookies["zxcookies"] != null)
{
HttpCookie mycookie;
mycookie = Request.Cookies["zxcookies"];
TimeSpan ts = new TimeSpan(0, 0, 0, 0);//时间跨度
mycookie.Expires = DateTime.Now.Add(ts);//立即过期
Response.Cookies.Remove("zxcookies");//清除
Response.Cookies.Add(mycookie);//写入立即过期的*/
Response.Cookies["zxcookies"].Expires =DateTime.Now.AddDays(-1);
2.vivado怎么用代码生成ipif (Request.Cookies["zxcookies"] != null)
{
HttpCookie mycookie;
mycookie = Request.Cookies["zxcookies"];
TimeSpan ts = new TimeSpan(0, 0, 0, 0);//时间跨度
mycookie.Expires = DateTime.Now.Add(ts);//立即过期
Response.Cookies.Remove("zxcookies");//清除
Response.Cookies.Add(mycookie);//写入立即过期的*/
Response.Cookies["zxcookies"].Expires =DateTime.Now.AddDays(-1);
3.如何打开vivado的debug窗口用Vivado进行硬件调试 , 就是要插入ila核 , 即“集成逻辑分析仪” , 然后将想要引出来观察的信号连到这个核的probe上 。
首先第一步 , 需要把想要观测的信号标记出来 , 即mark_debug , 有两种mark_debug的方法 , 我用verilog写了一个简单的流水灯程序 , 只有几行代码 , 如下:module main( input clk, input rst, output reg [7:0] led );(*mark_debug = "true"*)reg [23:0] counter; always @(posedge clk) begin if(rst) begin counter <= 0; led <= 8'b00000001; end else counter <= counter + 1; if (counter == 24'hffffff) led <= {led[6:0],led[7]}; end endmodule 例如 , 要观察counter信号的波形 , 那么在第7行定义reg型信号counter时 , 前面加上(*mark_debug=“true”*) , 这样就把counter信号标记了出来 。如果用vhdl语言实现的话 , 这句话用该这样写:signal counter : std_logic_vector (23 downto 0); attribute mark_debug: string; attribute mark_debug of counter : signal is "true"; 另外添加xdc约束文件 , 内容如下:set_property PACKAGE_PIN Y9 [get_ports clk] set_property PACKAGE_PIN T18 [get_ports rst] set_property IOSTANDARD LVCMOS33 [get_ports clk] set_property IOSTANDARD LVCMOS18 [get_ports rst] set_property PACKAGE_PIN T22 [get_ports {led[0]}] set_property PACKAGE_PIN T21 [get_ports {led[1]}] set_property PACKAGE_PIN U22 [get_ports {led[2]}] set_property PACKAGE_PIN U21 [get_ports {led[3]}] set_property PACKAGE_PIN V22 [get_ports {led[4]}] set_property PACKAGE_PIN W22 [get_ports {led[5]}] set_property PACKAGE_PIN U19 [get_ports {led[6]}] set_property PACKAGE_PIN U14 [get_ports {led[7]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[0]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[1]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[2]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[3]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[4]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[5]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[6]}] set_property IOSTANDARD LVCMOS33 [get_ports {led[7]}] 之后run synthesis综合 , 之后open synthesized design , 在左上角选择debug layout , 在debug窗口中netlist看到counter信号前面有一个绿色的小蜘蛛 , 表示counter信号被标记出来了 。
这其实是一种比较繁琐的方法 , 更为方便的方法是 , 直接综合工程 , 在之后打开综合设计 , 在netlist中直接选中想要查看的信号 , 右键选择mark debug , 即可将信号标记出来 。但是采用第一种方式的好处是 , 如果工程比较复杂的话 , 一些信号可能会被综合优化掉 , 加上模块层层实例化 , 在netlist中可能找不到要观测的信号 , 这时在代码里面mark_debug , 依旧可以将该信号引出来 。