OpenCores
URL https://opencores.org/ocsvn/pci/pci/trunk

Subversion Repositories pci

[/] [pci/] [tags/] [rel_6/] [rtl/] [verilog/] [pci_conf_space.v] - Diff between revs 88 and 111

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 88 Rev 111
Line 41... Line 41...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.2  2003/03/26 13:16:18  mihad
 
// Added the reset value parameter to the synchronizer flop module.
 
// Added resets to all synchronizer flop instances.
 
// Repaired initial sync value in fifos.
 
//
// Revision 1.1  2003/01/27 16:49:31  mihad
// Revision 1.1  2003/01/27 16:49:31  mihad
// Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
// Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
//
//
// Revision 1.4  2002/08/13 11:03:53  mihad
// Revision 1.4  2002/08/13 11:03:53  mihad
// Added a few testcases. Repaired wrong reset value for PCI_AM5 register. Repaired Parity Error Detected bit setting. Changed PCI_AM0 to always enabled(regardles of PCI_AM0 define), if image 0 is used as configuration image
// Added a few testcases. Repaired wrong reset value for PCI_AM5 register. Repaired Parity Error Detected bit setting. Changed PCI_AM0 to always enabled(regardles of PCI_AM0 define), if image 0 is used as configuration image
Line 2460... Line 2465...
                                                                 set_status_bit15_11[12] && !block_set_status_bit12,
                                                                 set_status_bit15_11[12] && !block_set_status_bit12,
                                                                 set_status_bit15_11[11] && !block_set_status_bit11,
                                                                 set_status_bit15_11[11] && !block_set_status_bit11,
                                                                 set_status_bit8                 && !block_set_status_bit8      } ;
                                                                 set_status_bit8                 && !block_set_status_bit8      } ;
        wire [5:0] meta_status_bits ;
        wire [5:0] meta_status_bits ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(6, 0) status_bits_sync
        pci_synchronizer_flop   #(6, 0) status_bits_sync
        (
        (
            .data_in        (status_bits),
            .data_in        (status_bits),
            .clk_out        (wb_clk),
            .clk_out        (wb_clk),
            .sync_data_out  (meta_status_bits),
            .sync_data_out  (meta_status_bits),
            .async_reset    (reset)
            .async_reset    (reset)
Line 2622... Line 2627...
                end
                end
        end
        end
        wire    pci_err_cs_bits = set_pci_err_cs_bit8 && !block_set_pci_err_cs_bit8 ;
        wire    pci_err_cs_bits = set_pci_err_cs_bit8 && !block_set_pci_err_cs_bit8 ;
        wire    meta_pci_err_cs_bits ;
        wire    meta_pci_err_cs_bits ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop #(1,0) pci_err_cs_bits_sync
        pci_synchronizer_flop #(1,0) pci_err_cs_bits_sync
        (
        (
            .data_in        (pci_err_cs_bits),
            .data_in        (pci_err_cs_bits),
            .clk_out        (pci_clk),
            .clk_out        (pci_clk),
            .sync_data_out  (meta_pci_err_cs_bits),
            .sync_data_out  (meta_pci_err_cs_bits),
            .async_reset    (reset)
            .async_reset    (reset)
Line 2724... Line 2729...
                end
                end
        end
        end
        wire    wb_err_cs_bits = set_wb_err_cs_bit8 && !block_set_wb_err_cs_bit8 ;
        wire    wb_err_cs_bits = set_wb_err_cs_bit8 && !block_set_wb_err_cs_bit8 ;
        wire    meta_wb_err_cs_bits ;
        wire    meta_wb_err_cs_bits ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop #(1,0) wb_err_cs_bits_sync
        pci_synchronizer_flop #(1,0) wb_err_cs_bits_sync
        (
        (
            .data_in        (wb_err_cs_bits),
            .data_in        (wb_err_cs_bits),
            .clk_out        (wb_clk),
            .clk_out        (wb_clk),
            .sync_data_out  (meta_wb_err_cs_bits),
            .sync_data_out  (meta_wb_err_cs_bits),
            .async_reset    (reset)
            .async_reset    (reset)
Line 2881... Line 2886...
        end
        end
        wire [4:3] isr_bits4_3  =       {set_isr_bit4_3[4] && !block_set_isr_bit4,
        wire [4:3] isr_bits4_3  =       {set_isr_bit4_3[4] && !block_set_isr_bit4,
                                                                 set_isr_bit4_3[3] && !block_set_isr_bit3       } ;
                                                                 set_isr_bit4_3[3] && !block_set_isr_bit3       } ;
        wire [4:3] meta_isr_bits4_3 ;
        wire [4:3] meta_isr_bits4_3 ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(2, 0) isr_bits_sync
        pci_synchronizer_flop   #(2, 0) isr_bits_sync
        (
        (
            .data_in        (isr_bits4_3),
            .data_in        (isr_bits4_3),
            .clk_out        (wb_clk),
            .clk_out        (wb_clk),
            .sync_data_out  (meta_isr_bits4_3),
            .sync_data_out  (meta_isr_bits4_3),
            .async_reset    (reset)
            .async_reset    (reset)
Line 2960... Line 2965...
                end
                end
        end
        end
        wire    isr_bit1        = set_isr_bit1 && !block_set_isr_bit1 ;
        wire    isr_bit1        = set_isr_bit1 && !block_set_isr_bit1 ;
        wire    meta_isr_bit1 ;
        wire    meta_isr_bit1 ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(1, 0) isr_bit1_sync
        pci_synchronizer_flop   #(1, 0) isr_bit1_sync
        (
        (
            .data_in        (isr_bit1),
            .data_in        (isr_bit1),
            .clk_out        (wb_clk),
            .clk_out        (wb_clk),
            .sync_data_out  (meta_isr_bit1),
            .sync_data_out  (meta_isr_bit1),
            .async_reset    (reset)
            .async_reset    (reset)
Line 3033... Line 3038...
                end
                end
        end
        end
        wire    isr_bit2        = set_isr_bit2 && !block_set_isr_bit2 ;
        wire    isr_bit2        = set_isr_bit2 && !block_set_isr_bit2 ;
        wire    meta_isr_bit2 ;
        wire    meta_isr_bit2 ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(1, 0) isr_bit2_sync
        pci_synchronizer_flop   #(1, 0) isr_bit2_sync
        (
        (
            .data_in        (isr_bit2),
            .data_in        (isr_bit2),
            .clk_out        (pci_clk),
            .clk_out        (pci_clk),
            .sync_data_out  (meta_isr_bit2),
            .sync_data_out  (meta_isr_bit2),
            .async_reset    (reset)
            .async_reset    (reset)
Line 3055... Line 3060...
// INT BIT of ISR - interrupt status register
// INT BIT of ISR - interrupt status register
`ifdef HOST
`ifdef HOST
        wire    isr_int_prop_bit = isr_int_prop && icr_bit2_0[0] ;
        wire    isr_int_prop_bit = isr_int_prop && icr_bit2_0[0] ;
        wire    meta_isr_int_prop_bit ;
        wire    meta_isr_int_prop_bit ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(1, 0) isr_bit0_sync
        pci_synchronizer_flop   #(1, 0) isr_bit0_sync
        (
        (
            .data_in        (isr_int_prop_bit),
            .data_in        (isr_int_prop_bit),
            .clk_out        (wb_clk),
            .clk_out        (wb_clk),
            .sync_data_out  (meta_isr_int_prop_bit),
            .sync_data_out  (meta_isr_int_prop_bit),
            .async_reset    (reset)
            .async_reset    (reset)
Line 3083... Line 3088...
        end
        end
  `else // not SYNCHRONEOUS_CLOCK_DOMAINS
  `else // not SYNCHRONEOUS_CLOCK_DOMAINS
        wire    isr_int_prop_bit = isr_int_prop && icr_bit2_0[0] ;
        wire    isr_int_prop_bit = isr_int_prop && icr_bit2_0[0] ;
        wire    meta_isr_int_prop_bit ;
        wire    meta_isr_int_prop_bit ;
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(1, 0) isr_bit0_sync
        pci_synchronizer_flop   #(1, 0) isr_bit0_sync
        (
        (
            .data_in        (isr_int_prop_bit),
            .data_in        (isr_int_prop_bit),
            .clk_out        (pci_clk),
            .clk_out        (pci_clk),
            .sync_data_out  (meta_isr_int_prop_bit),
            .sync_data_out  (meta_isr_int_prop_bit),
            .async_reset    (reset)
            .async_reset    (reset)
Line 3111... Line 3116...
        assign  int_in = isr_int_prop_bit || isr_bit2_0[1] || isr_bit2_0[2] || isr_bit4_3[3]  || isr_bit4_3[4];
        assign  int_in = isr_int_prop_bit || isr_bit2_0[1] || isr_bit2_0[2] || isr_bit4_3[3]  || isr_bit4_3[4];
 `else // not SYNCHRONEOUS_CLOCK_DOMAINS
 `else // not SYNCHRONEOUS_CLOCK_DOMAINS
        assign  int_in = isr_int_prop_bit || isr_bit1      || isr_bit2_0[2] || isr_bits4_3[3] || isr_bits4_3[4];
        assign  int_in = isr_int_prop_bit || isr_bit1      || isr_bit2_0[2] || isr_bits4_3[3] || isr_bits4_3[4];
 `endif
 `endif
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(1, 0) int_pin_sync
        pci_synchronizer_flop   #(1, 0) int_pin_sync
        (
        (
            .data_in        (int_in),
            .data_in        (int_in),
            .clk_out        (wb_clk),
            .clk_out        (wb_clk),
            .sync_data_out  (int_meta),
            .sync_data_out  (int_meta),
            .async_reset    (reset)
            .async_reset    (reset)
Line 3132... Line 3137...
        assign  int_in = isr_int_prop_bit || isr_bit2_0[1] || isr_bit2_0[2];
        assign  int_in = isr_int_prop_bit || isr_bit2_0[1] || isr_bit2_0[2];
 `else // not SYNCHRONEOUS_CLOCK_DOMAINS
 `else // not SYNCHRONEOUS_CLOCK_DOMAINS
        assign  int_in = isr_int_prop_bit || isr_bit2_0[1] || isr_bit2;
        assign  int_in = isr_int_prop_bit || isr_bit2_0[1] || isr_bit2;
 `endif
 `endif
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        // interemediate stage to clk synchronization flip - flops - this ones are prone to metastability
        synchronizer_flop   #(1, 0) int_pin_sync
        pci_synchronizer_flop   #(1, 0) int_pin_sync
        (
        (
            .data_in        (int_in),
            .data_in        (int_in),
            .clk_out        (pci_clk),
            .clk_out        (pci_clk),
            .sync_data_out  (int_meta),
            .sync_data_out  (int_meta),
            .async_reset    (reset)
            .async_reset    (reset)
Line 3157... Line 3162...
// if bridge is HOST then write clock is equal to WB clock, and synchronization of outputs has to be done
// if bridge is HOST then write clock is equal to WB clock, and synchronization of outputs has to be done
`ifdef  HOST
`ifdef  HOST
  wire [3:0] command_bits = {command_bit8, command_bit6, command_bit2_0[1:0]} ;
  wire [3:0] command_bits = {command_bit8, command_bit6, command_bit2_0[1:0]} ;
  wire [3:0] meta_command_bits ;
  wire [3:0] meta_command_bits ;
  reg  [3:0] sync_command_bits ;
  reg  [3:0] sync_command_bits ;
  synchronizer_flop   #(4, 0)  command_bits_sync
  pci_synchronizer_flop   #(4, 0)  command_bits_sync
  (
  (
      .data_in        (command_bits),
      .data_in        (command_bits),
      .clk_out        (pci_clk),
      .clk_out        (pci_clk),
      .sync_data_out  (meta_command_bits),
      .sync_data_out  (meta_command_bits),
      .async_reset    (reset)
      .async_reset    (reset)
Line 3180... Line 3185...
  wire  sync_command_bit2 = command_bit2_0[2] ;
  wire  sync_command_bit2 = command_bit2_0[2] ;
`else   // GUEST
`else   // GUEST
  wire       command_bit = command_bit2_0[2] ;
  wire       command_bit = command_bit2_0[2] ;
  wire       meta_command_bit ;
  wire       meta_command_bit ;
  reg        sync_command_bit ;
  reg        sync_command_bit ;
  synchronizer_flop   #(1, 0) command_bit_sync
  pci_synchronizer_flop   #(1, 0) command_bit_sync
  (
  (
      .data_in        (command_bit),
      .data_in        (command_bit),
      .clk_out        (pci_clk),
      .clk_out        (pci_clk),
      .sync_data_out  (meta_command_bit),
      .sync_data_out  (meta_command_bit),
      .async_reset    (reset)
      .async_reset    (reset)
Line 3216... Line 3221...
                                                                (!cache_line_size_reg[1] && !cache_line_size_reg[0]) );
                                                                (!cache_line_size_reg[1] && !cache_line_size_reg[0]) );
`ifdef  HOST
`ifdef  HOST
  wire [7:2] cache_lsize_to_pci_bits = { cache_line_size_reg[7:2] } ;
  wire [7:2] cache_lsize_to_pci_bits = { cache_line_size_reg[7:2] } ;
  wire [7:2] meta_cache_lsize_to_pci_bits ;
  wire [7:2] meta_cache_lsize_to_pci_bits ;
  reg  [7:2] sync_cache_lsize_to_pci_bits ;
  reg  [7:2] sync_cache_lsize_to_pci_bits ;
  synchronizer_flop   #(6, 0)  cache_lsize_to_pci_bits_sync
  pci_synchronizer_flop   #(6, 0)  cache_lsize_to_pci_bits_sync
  (
  (
      .data_in        (cache_lsize_to_pci_bits),
      .data_in        (cache_lsize_to_pci_bits),
      .clk_out        (pci_clk),
      .clk_out        (pci_clk),
      .sync_data_out  (meta_cache_lsize_to_pci_bits),
      .sync_data_out  (meta_cache_lsize_to_pci_bits),
      .async_reset    (reset)
      .async_reset    (reset)
Line 3237... Line 3242...
  wire           sync_cache_lsize_not_zero_to_wb        = cache_lsize_not_zero ;
  wire           sync_cache_lsize_not_zero_to_wb        = cache_lsize_not_zero ;
// Latency timer is sinchronized only to PCI clock when bridge implementation is HOST
// Latency timer is sinchronized only to PCI clock when bridge implementation is HOST
  wire [7:0] latency_timer_bits = latency_timer ;
  wire [7:0] latency_timer_bits = latency_timer ;
  wire [7:0] meta_latency_timer_bits ;
  wire [7:0] meta_latency_timer_bits ;
  reg  [7:0] sync_latency_timer_bits ;
  reg  [7:0] sync_latency_timer_bits ;
  synchronizer_flop   #(8, 0)  latency_timer_bits_sync
  pci_synchronizer_flop   #(8, 0)  latency_timer_bits_sync
  (
  (
      .data_in        (latency_timer_bits),
      .data_in        (latency_timer_bits),
      .clk_out        (pci_clk),
      .clk_out        (pci_clk),
      .sync_data_out  (meta_latency_timer_bits),
      .sync_data_out  (meta_latency_timer_bits),
      .async_reset    (reset)
      .async_reset    (reset)
Line 3256... Line 3261...
  wire [7:0] sync_latency_timer = sync_latency_timer_bits ;
  wire [7:0] sync_latency_timer = sync_latency_timer_bits ;
`else   // GUEST
`else   // GUEST
  wire [8:2] cache_lsize_to_wb_bits = { cache_lsize_not_zero, cache_line_size_reg[7:2] } ;
  wire [8:2] cache_lsize_to_wb_bits = { cache_lsize_not_zero, cache_line_size_reg[7:2] } ;
  wire [8:2] meta_cache_lsize_to_wb_bits ;
  wire [8:2] meta_cache_lsize_to_wb_bits ;
  reg  [8:2] sync_cache_lsize_to_wb_bits ;
  reg  [8:2] sync_cache_lsize_to_wb_bits ;
  synchronizer_flop   #(7, 0)  cache_lsize_to_wb_bits_sync
  pci_synchronizer_flop   #(7, 0)  cache_lsize_to_wb_bits_sync
  (
  (
      .data_in        (cache_lsize_to_wb_bits),
      .data_in        (cache_lsize_to_wb_bits),
      .clk_out        (wb_clk),
      .clk_out        (wb_clk),
      .sync_data_out  (meta_cache_lsize_to_wb_bits),
      .sync_data_out  (meta_cache_lsize_to_wb_bits),
      .async_reset    (reset)
      .async_reset    (reset)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.