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

Subversion Repositories wbscope

[/] [wbscope/] [trunk/] [rtl/] [wbscopc.v] - Diff between revs 6 and 8

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

Rev 6 Rev 8
Line 115... Line 115...
        //
        //
        // To implement this, we set our 'address' to zero any time the
        // To implement this, we set our 'address' to zero any time the
        // data changes, but increment it on all other clocks.  Should the
        // data changes, but increment it on all other clocks.  Should the
        // address difference get to our maximum value, we let it saturate
        // address difference get to our maximum value, we let it saturate
        // rather than overflow.
        // rather than overflow.
        reg     [(BUSW-2):0]     ck_addr;
        reg     [(BUSW-2):0]     ck_addr, lst_dat;
        initial ck_addr = 0;
        initial ck_addr = 0;
        always @(posedge i_clk)
        always @(posedge i_clk)
                if ((lcl_reset)||((i_ce)&&(i_data != lst_data)))
                if ((lcl_reset)||((i_ce)&&(i_data != lst_dat)))
                        ck_addr <= 0;
                        ck_addr <= 0;
                else if (&ck_addr)
                else if (&ck_addr)
                        ;       // Saturated (non-overflowing) address diff
                        ;       // Saturated (non-overflowing) address diff
                else
                else
                        ck_addr <= ck_addr + 1;
                        ck_addr <= ck_addr + 1;
Line 131... Line 131...
        // To do our compression, we keep track of two registers: the most
        // To do our compression, we keep track of two registers: the most
        // recent data to the device (imm_ prefix) and the data from one
        // recent data to the device (imm_ prefix) and the data from one
        // clock ago.  This allows us to suppress writes to the scope which
        // clock ago.  This allows us to suppress writes to the scope which
        // would otherwise be two address writes in a row.
        // would otherwise be two address writes in a row.
        reg     imm_adr, lst_adr; // Is this an address (1'b1) or data value?
        reg     imm_adr, lst_adr; // Is this an address (1'b1) or data value?
        reg     [(BUSW-2):0]     lst_dat, // The data associated with t-1
        reg     [(BUSW-2):0]     lst_val, // Data for the scope, delayed by one
                                lst_val, // Data for the scope, delayed by one
 
                                imm_val; // Data to write to the scope
                                imm_val; // Data to write to the scope
        initial lst_dat = 0;
        initial lst_dat = 0;
        initial lst_adr = 1'b1;
        initial lst_adr = 1'b1;
        initial imm_adr = 1'b1;
        initial imm_adr = 1'b1;
        always @(posedge i_clk)
        always @(posedge i_clk)

powered by: WebSVN 2.1.0

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