2013-02-13 81 views

回答

1

据我所知,不... 但是,你可以为4个部分('虚拟信号...')创建虚拟信号。
将这些显示为十进制('-radix unsigned')。
然后用这4个虚拟信号创建一个组('add wave ... -group ...)。

我发现在GUI中创建虚拟信号和组更容易,然后自己在DO文件('工具' - >'虚拟生成器')中输入它。

测试VHDL文件:

library ieee; 
use ieee.std_logic_1164.all; 

entity test is 
end entity test; 

architecture rtl of test is 
    signal ip : std_logic_vector(31 downto 0) := x"AC_10_41_3D"; -- 172.16.65.61 
begin -- architecture rtl 
end architecture rtl; 

一个wave.do文件的重要部分组成:

quietly virtual signal -install /test { /test/ip(31 downto 24)} ip_3 
quietly virtual signal -install /test { /test/ip(23 downto 16)} ip_2 
quietly virtual signal -install /test { /test/ip(15 downto 8)} ip_1 
quietly virtual signal -install /test { /test/ip(7 downto 0)} ip_0 
add wave -noupdate /test/ip; # without formatting 
# group the 4 parts of the IP address and display them as decimal 
add wave -noupdate -expand -group {IP_formatted} -radix unsigned /test/ip_3 
add wave -noupdate -expand -group {IP_formatted} -radix unsigned /test/ip_2 
add wave -noupdate -expand -group {IP_formatted} -radix unsigned /test/ip_1 
add wave -noupdate -expand -group {IP_formatted} -radix unsigned /test/ip_0