syedshan
Advanced Member level 1
- Joined
- Feb 27, 2012
- Messages
- 463
- Helped
- 27
- Reputation
- 54
- Reaction score
- 26
- Trophy points
- 1,308
- Location
- Jeonju, South Korea
- Activity points
- 5,134
Hi all
I want to know what does mailbox in digital system means...
I mean I have an IP and I am digging into it and I found to different interfaces for sending command out.
One is simple command and the other is mailbox, but I found no apparent difference between the two and hence am confused why different.
The following is the snippet for command interface
where as in the top level module, the code that generate mail box register values is as follows...
I want to know what does mailbox in digital system means...
I mean I have an IP and I am digging into it and I found to different interfaces for sending command out.
One is simple command and the other is mailbox, but I found no apparent difference between the two and hence am confused why different.
The following is the snippet for command interface
Code:
--command entity
port(
..
--command interface
clk_cmd :in std_logic; --cmd_in and cmd_out are synchronous to this clock;
out_cmd :out std_logic_vector(63 downto 0);
out_cmd_val :out std_logic;
in_cmd :in std_logic_vector(63 downto 0);
in_cmd_val :in std_logic;
...
...
--mailbox interface
mbx_in_reg :in std_logic_vector(31 downto 0);--value of the mailbox to send
mbx_in_val :in std_logic --pulse to indicate mailbox is valid
);
architecture ...
....
if (out_cmd_val_sig='1') then
out_cmd(31 downto 0) <=in_reg;
out_cmd(59 downto 32)<=in_reg_addr_sig+start_addr;
out_cmd(63 downto 60)<=cmd_rd_ack;
elsif (mbx_in_val_sig='1' or mbx_received='1' ) then
out_cmd(31 downto 0) <=mbx_in_reg;
out_cmd(59 downto 32)<=start_addr;
out_cmd(63 downto 60)<=(others=>'0');
else
out_cmd(63 downto 0)<=(others=>'0');
end if;
where as in the top level module, the code that generate mail box register values is as follows...
Code:
status_proc: process(clk_reg )
begin
if(rising_edge(clk_reg)) then
if (burst_skipped ='1' and burst_skip_int_en='1') then
--send a mailbox to indicate a burst was skipped
mbx_in_reg <= x"02" & skip_counter;
mbx_in_val <= '1';
elsif (burst_done ='1' and burst_done_int_en='1') then
--send a mailbox to indicate a burst was done
mbx_in_reg <= x"01" & skip_counter;
mbx_in_val <= '1';
else
mbx_in_reg <= mbx_in_reg;
mbx_in_val <= '0';
end if;
end if;
end process;