L
leaf
Guest
To anyone familiar with PCI target core design:
consider this code: (part of the Target State Machine)
when IDLE =>
if (PCI_Frame_n = '0' and Hit = '0') then
nextState <= B_BUSY;
else
nextState <= IDLE;
end if;
when B_BUSY =>
...
i'm currently (re)developing my PCI target core so that it 'support'
the State machine design documented on the PCI Local Bus Specification
3.0
my question is that how can this state machine go to the next state if
PCI is doing a configuration read...
considering that:
Hit <= '1' when (( pci_ad = bar ) and mem_en ) else '0'; --// mem_en =
cben(1) during config reads...
NOTE:
configuration read: frame# is asserted, config register address is
placed on AD bus,
command is place in cben and idsel is asserted...
also note that frame# is asserted only for 1 clock cycle (config_read)
and this happens on second rising edge of "clk" lets assume...
in this case: valid Address (probably address of BAR0 4h) will only be
latched at second rising edge of "clk" also the command...
--------------------
following the State machine we have IDLE at first, and will be IDLE
until FRAME# is asserted (probably at second rising edge )
at this point there is valid address/conmmand on PCI bus.
but Hit is still ZERO since pci_ad = bar is FALSE...
(and hit will never be ONE since valid address/command to decode only
happen on second rising edge, for our example)...
At a PCI Target State Machine when is the time to latch Address and
Command for decoding? should it be done seperately from the FSM?
---
YOUNG_LEAF
consider this code: (part of the Target State Machine)
when IDLE =>
if (PCI_Frame_n = '0' and Hit = '0') then
nextState <= B_BUSY;
else
nextState <= IDLE;
end if;
when B_BUSY =>
...
i'm currently (re)developing my PCI target core so that it 'support'
the State machine design documented on the PCI Local Bus Specification
3.0
my question is that how can this state machine go to the next state if
PCI is doing a configuration read...
considering that:
Hit <= '1' when (( pci_ad = bar ) and mem_en ) else '0'; --// mem_en =
cben(1) during config reads...
NOTE:
configuration read: frame# is asserted, config register address is
placed on AD bus,
command is place in cben and idsel is asserted...
also note that frame# is asserted only for 1 clock cycle (config_read)
and this happens on second rising edge of "clk" lets assume...
in this case: valid Address (probably address of BAR0 4h) will only be
latched at second rising edge of "clk" also the command...
--------------------
following the State machine we have IDLE at first, and will be IDLE
until FRAME# is asserted (probably at second rising edge )
at this point there is valid address/conmmand on PCI bus.
but Hit is still ZERO since pci_ad = bar is FALSE...
(and hit will never be ONE since valid address/command to decode only
happen on second rising edge, for our example)...
At a PCI Target State Machine when is the time to latch Address and
Command for decoding? should it be done seperately from the FSM?
---
YOUNG_LEAF