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

Subversion Repositories cic

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 2 to Rev 1
    Reverse comparison

Rev 2 → Rev 1

/cic/locks/db.lock File deleted
/cic/README.txt File deleted
/cic/format File deleted
/cic/svn.ico Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
cic/svn.ico Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: cic/db/fsfs.conf =================================================================== --- cic/db/fsfs.conf (revision 2) +++ cic/db/fsfs.conf (nonexistent) @@ -1,38 +0,0 @@ -### This file controls the configuration of the FSFS filesystem. - -[memcached-servers] -### These options name memcached servers used to cache internal FSFS -### data. See http://www.danga.com/memcached/ for more information on -### memcached. To use memcached with FSFS, run one or more memcached -### servers, and specify each of them as an option like so: -# first-server = 127.0.0.1:11211 -# remote-memcached = mymemcached.corp.example.com:11212 -### The option name is ignored; the value is of the form HOST:PORT. -### memcached servers can be shared between multiple repositories; -### however, if you do this, you *must* ensure that repositories have -### distinct UUIDs and paths, or else cached data from one repository -### might be used by another accidentally. Note also that memcached has -### no authentication for reads or writes, so you must ensure that your -### memcached servers are only accessible by trusted users. - -[caches] -### When a cache-related error occurs, normally Subversion ignores it -### and continues, logging an error if the server is appropriately -### configured (and ignoring it with file:// access). To make -### Subversion never ignore cache errors, uncomment this line. -# fail-stop = true - -[rep-sharing] -### To conserve space, the filesystem can optionally avoid storing -### duplicate representations. This comes at a slight cost in -### performance, as maintaining a database of shared representations can -### increase commit times. The space savings are dependent upon the size -### of the repository, the number of objects it contains and the amount of -### duplication between them, usually a function of the branching and -### merging process. -### -### The following parameter enables rep-sharing in the repository. It can -### be switched on and off at will, but for best space-saving results -### should be enabled consistently over the life of the repository. -### rep-sharing is enabled by default. -# enable-rep-sharing = true Index: cic/db/min-unpacked-rev =================================================================== --- cic/db/min-unpacked-rev (revision 2) +++ cic/db/min-unpacked-rev (nonexistent) @@ -1 +0,0 @@ -0 Index: cic/db/uuid =================================================================== --- cic/db/uuid (revision 2) +++ cic/db/uuid (nonexistent) @@ -1 +0,0 @@ -d7116455-55bd-c64a-b681-12db84424bcf Index: cic/db/fs-type =================================================================== --- cic/db/fs-type (revision 2) +++ cic/db/fs-type (nonexistent) @@ -1 +0,0 @@ -fsfs Index: cic/db/format =================================================================== --- cic/db/format (revision 2) +++ cic/db/format (nonexistent) @@ -1,2 +0,0 @@ -4 -layout sharded 1000 Index: cic/db/txn-current =================================================================== --- cic/db/txn-current (revision 2) +++ cic/db/txn-current (nonexistent) @@ -1 +0,0 @@ -0 Index: cic/db/revs/0/0 =================================================================== --- cic/db/revs/0/0 (revision 2) +++ cic/db/revs/0/0 (nonexistent) @@ -1,11 +0,0 @@ -PLAIN -END -ENDREP -id: 0.0.r0/17 -type: dir -count: 0 -text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e -cpath: / - - -17 107 Index: cic/db/revprops/0/0 =================================================================== --- cic/db/revprops/0/0 (revision 2) +++ cic/db/revprops/0/0 (nonexistent) @@ -1,5 +0,0 @@ -K 8 -svn:date -V 27 -2012-06-08T09:30:21.546147Z -END Index: cic/db/current =================================================================== --- cic/db/current (revision 2) +++ cic/db/current (nonexistent) @@ -1 +0,0 @@ -0 Index: cic/Desktop.ini =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: cic/Desktop.ini =================================================================== --- cic/Desktop.ini (revision 2) +++ cic/Desktop.ini (nonexistent)
cic/Desktop.ini Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: cic/conf/svnserve.conf =================================================================== --- cic/conf/svnserve.conf (revision 2) +++ cic/conf/svnserve.conf (nonexistent) @@ -1,61 +0,0 @@ -### This file controls the configuration of the svnserve daemon, if you -### use it to allow access to this repository. (If you only allow -### access through http: and/or file: URLs, then this file is -### irrelevant.) - -### Visit http://subversion.apache.org/ for more information. - -[general] -### The anon-access and auth-access options control access to the -### repository for unauthenticated (a.k.a. anonymous) users and -### authenticated users, respectively. -### Valid values are "write", "read", and "none". -### Setting the value to "none" prohibits both reading and writing; -### "read" allows read-only access, and "write" allows complete -### read/write access to the repository. -### The sample settings below are the defaults and specify that anonymous -### users have read-only access to the repository, while authenticated -### users have read and write access to the repository. -# anon-access = read -# auth-access = write -### The password-db option controls the location of the password -### database file. Unless you specify a path starting with a /, -### the file's location is relative to the directory containing -### this configuration file. -### If SASL is enabled (see below), this file will NOT be used. -### Uncomment the line below to use the default password file. -# password-db = passwd -### The authz-db option controls the location of the authorization -### rules for path-based access control. Unless you specify a path -### starting with a /, the file's location is relative to the the -### directory containing this file. If you don't specify an -### authz-db, no path-based access control is done. -### Uncomment the line below to use the default authorization file. -# authz-db = authz -### This option specifies the authentication realm of the repository. -### If two repositories have the same authentication realm, they should -### have the same password database, and vice versa. The default realm -### is repository's uuid. -# realm = My First Repository -### The force-username-case option causes svnserve to case-normalize -### usernames before comparing them against the authorization rules in the -### authz-db file configured above. Valid values are "upper" (to upper- -### case the usernames), "lower" (to lowercase the usernames), and -### "none" (to compare usernames as-is without case conversion, which -### is the default behavior). -# force-username-case = none - -[sasl] -### This option specifies whether you want to use the Cyrus SASL -### library for authentication. Default is false. -### This section will be ignored if svnserve is not built with Cyrus -### SASL support; to check, run 'svnserve --version' and look for a line -### reading 'Cyrus SASL authentication is available.' -# use-sasl = true -### These options specify the desired strength of the security layer -### that you want SASL to provide. 0 means no encryption, 1 means -### integrity-checking only, values larger than 1 are correlated -### to the effective key length for encryption (e.g. 128 means 128-bit -### encryption). The values below are the defaults. -# min-encryption = 0 -# max-encryption = 256 Index: cic/conf/passwd =================================================================== --- cic/conf/passwd (revision 2) +++ cic/conf/passwd (nonexistent) @@ -1,8 +0,0 @@ -### This file is an example password file for svnserve. -### Its format is similar to that of svnserve.conf. As shown in the -### example below it contains one section labelled [users]. -### The name and password for each user follow, one account per line. - -[users] -# harry = harryssecret -# sally = sallyssecret Index: cic/conf/authz =================================================================== --- cic/conf/authz (revision 2) +++ cic/conf/authz (nonexistent) @@ -1,32 +0,0 @@ -### This file is an example authorization file for svnserve. -### Its format is identical to that of mod_authz_svn authorization -### files. -### As shown below each section defines authorizations for the path and -### (optional) repository specified by the section name. -### The authorizations follow. An authorization line can refer to: -### - a single user, -### - a group of users defined in a special [groups] section, -### - an alias defined in a special [aliases] section, -### - all authenticated users, using the '$authenticated' token, -### - only anonymous users, using the '$anonymous' token, -### - anyone, using the '*' wildcard. -### -### A match can be inverted by prefixing the rule with '~'. Rules can -### grant read ('r') access, read-write ('rw') access, or no access -### (''). - -[aliases] -# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average - -[groups] -# harry_and_sally = harry,sally -# harry_sally_and_joe = harry,sally,&joe - -# [/foo/bar] -# harry = rw -# &joe = r -# * = - -# [repository:/baz/fuz] -# @harry_and_sally = rw -# * = r Index: cic/trunk/script/sc.tcl =================================================================== --- cic/trunk/script/sc.tcl (revision 2) +++ cic/trunk/script/sc.tcl (nonexistent) @@ -1,8 +0,0 @@ -rm *.o *.vcd - -export HEADER=$PWD/header -export SOURCE=./source - -g++ -I$SYSTEMC_HOME/include -I$HEADER -L$SYSTEMC_HOME/lib-linux $SOURCE/cicDecimator.cpp -lsystemc -lm -o cic.o -./cic.o -gtkwave wave.vcd Index: cic/trunk/source/downsample.cpp =================================================================== --- cic/trunk/source/downsample.cpp (revision 2) +++ cic/trunk/source/downsample.cpp (nonexistent) @@ -1,142 +0,0 @@ -#include -using namespace std; - -#include "systemc.h" -#include "downsample.h" - -int sc_main(int argc, char* argv[]) -{ - sc_clock CLK("CLK", 10, SC_NS); - sc_signal CLR; - sc_signal samplesIN; - sc_signal sampleOUT; - sc_signal SCLK; - - downsample DUT("DUT"); - DUT.CLR(CLR); - DUT.CLK(CLK); - DUT.samplesIN(samplesIN); - DUT.sampleOUT(sampleOUT); - DUT.SCLK(SCLK); - - sc_trace_file *fp; - fp = sc_create_vcd_trace_file("wave"); - fp -> set_time_unit(100, SC_PS); - - sc_trace(fp, CLR, "CLR"); - sc_trace(fp, CLK, "CLK"); - sc_trace(fp, SCLK, "SCLK"); - sc_trace(fp, samplesIN, "samplesIN"); - sc_trace(fp, sampleOUT, "sampleOUT"); - for (int i = 0; i < M; i++) - { - char str[3]; - sprintf(str, "(%0d)", i); - sc_trace(fp, DUT.reg[i], "reg"+string(str)); - } - - CLR = true; - samplesIN = 0; - sc_start(73, SC_NS); - - CLR = false; - samplesIN = 1; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 4; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 5; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 10; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 32; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 17; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 19; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 84; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 51; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 14; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 31; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 11; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 116; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 47; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 5653; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 10; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 39; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 66; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 98; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 123; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 47; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 25; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 56; - sc_start(10, SC_NS); - - CLR = false; - samplesIN = 78; - sc_start(10, SC_NS); - - sc_close_vcd_trace_file(fp); - - return 0; - -} Index: cic/trunk/source/integrator.cpp =================================================================== --- cic/trunk/source/integrator.cpp (revision 2) +++ cic/trunk/source/integrator.cpp (nonexistent) @@ -1,57 +0,0 @@ -#include "systemc.h" -#include "integrator.h" - -int sc_main(int argc, char* argv[]) -{ - sc_clock CLK("CLK", 10, SC_NS); - sc_signal CLR; - sc_signal integratorIN; - sc_signal internal; - sc_signal integratorOUT; - - integrator DUT0("DUT0"); - DUT0.CLR(CLR); - DUT0.CLK(CLK); - DUT0.integratorIN(integratorIN); - DUT0.integratorOUT(internal); - - integrator DUT1("DUT1"); - DUT1.CLR(CLR); - DUT1.CLK(CLK); - DUT1.integratorIN(internal); - DUT1.integratorOUT(integratorOUT); - - sc_trace_file *fp; - fp = sc_create_vcd_trace_file("wave"); - fp -> set_time_unit(100, SC_PS); - - sc_trace(fp, CLR, "CLR"); - sc_trace(fp, CLK, "CLK"); - sc_trace(fp, integratorIN, "integratorIN"); - sc_trace(fp, internal, "internal"); - sc_trace(fp, integratorOUT, "integratorOUT"); - sc_trace(fp, DUT0.r_delay, "delay0"); - sc_trace(fp, DUT1.r_delay, "delay1"); - - CLR = true; - integratorIN = 0; - sc_start(73, SC_NS); - - CLR = false; - integratorIN = 1; - sc_start(150, SC_NS); - - CLR = false; - integratorIN = 0; - sc_start(40, SC_NS); - - CLR = false; - integratorIN = 1; - sc_start(40, SC_NS); - - sc_close_vcd_trace_file(fp); - - return 0; -} - -// g++ -I$SYSTEMC_HOME/include -L$SYSTEMC_HOME/lib-linux integrator.cpp -lsystemc -lm -o int.o Index: cic/trunk/source/cic.cpp =================================================================== --- cic/trunk/source/cic.cpp (revision 2) +++ cic/trunk/source/cic.cpp (nonexistent) @@ -1,66 +0,0 @@ -#include -using namespace std; - -#include "systemc.h" -#include "cic.h" - -int sc_main(int argc, char* argv[]) -{ - sc_clock CLK("CLK", 10, SC_NS); - sc_signal CLR; - sc_signal cicIN; - sc_signal cicOUT; - - cic DUT("DUT"); - DUT.CLR(CLR); - DUT.CLK(CLK); - DUT.cicIN(cicIN); - DUT.cicOUT(cicOUT); - - sc_trace_file *fp; - fp = sc_create_vcd_trace_file("wave"); - fp -> set_time_unit(100, SC_PS); - - sc_trace(fp, CLR, "CLR"); - sc_trace(fp, CLK, "CLK"); - sc_trace(fp, cicIN, "cicIN"); - sc_trace(fp, cicOUT, "cicOUT"); - - for(int i = 0; i < N; i++) - { - char str[3]; - sprintf(str, "(%0d)",i); - sc_trace(fp, DUT.internalI[i],"I" + string(str)); - } - for(int i = 0; i < N; i++) - { - char str[3]; - sprintf(str, "(%0d)",i); - sc_trace(fp, DUT.internalC[i],"C" + string(str)); - } - - CLR = true; - cicIN = 0; - sc_start(73, SC_NS); - - CLR = false; - cicIN = 1; - sc_start(390, SC_NS); - - /*CLR = false; - cicIN = 2; - sc_start(10, SC_NS); - - CLR = false; - cicIN = 3; - sc_start(10, SC_NS); - - CLR = false; - cicIN = 4; - sc_start(10, SC_NS); */ - - sc_close_vcd_trace_file(fp); - - return 0; - -} Index: cic/trunk/source/comb.cpp =================================================================== --- cic/trunk/source/comb.cpp (revision 2) +++ cic/trunk/source/comb.cpp (nonexistent) @@ -1,74 +0,0 @@ -#include "systemc.h" -#include "comb.h" - -int sc_main(int argc, char* argv[]) -{ - sc_clock CLK("CLK", 10, SC_NS); - sc_signal CLR; - sc_signal combIN; - sc_signal combOUT; - sc_signal internal; - - comb DUT0("DUT0"); - DUT0.CLR(CLR); - DUT0.CLK(CLK); - DUT0.combIN(combIN); - DUT0.combOUT(internal); - - comb DUT1("DUT1"); - DUT1.CLR(CLR); - DUT1.CLK(CLK); - DUT1.combIN(internal); - DUT1.combOUT(combOUT); - - sc_trace_file *fp; - fp = sc_create_vcd_trace_file("wave"); - fp -> set_time_unit(100, SC_PS); - - sc_trace(fp, CLR, "CLR"); - sc_trace(fp, CLK, "CLK"); - sc_trace(fp, combIN, "combIN"); - sc_trace(fp, internal, "internal"); - sc_trace(fp, combOUT, "combOUT"); - - sc_trace(fp, DUT0.r, "r0"); - sc_trace(fp, DUT0.r_delay, "delay0"); - sc_trace(fp, DUT1.r, "r1"); - sc_trace(fp, DUT1.r_delay, "delay1"); - - CLR = true; - combIN = 0; - sc_start(9, SC_NS); - - CLR = false; - combIN = 1; - sc_start(10, SC_NS); - - CLR = false; - combIN = 4; - sc_start(10, SC_NS); - - CLR = false; - combIN = 10; - sc_start(10, SC_NS); - - CLR = false; - combIN = 20; - sc_start(10, SC_NS); - - CLR = false; - combIN = 35; - sc_start(10, SC_NS); - - CLR = false; - combIN = 56; - sc_start(10, SC_NS); - - sc_close_vcd_trace_file(fp); - - return 0; - -} - -// g++ -I$SYSTEMC_HOME/include -L$SYSTEMC_HOME/lib-linux comb.cpp -lsystemc -lm -o comb.o - Index: cic/trunk/source/cicDecimator.cpp =================================================================== --- cic/trunk/source/cicDecimator.cpp (revision 2) +++ cic/trunk/source/cicDecimator.cpp (nonexistent) @@ -1,68 +0,0 @@ -#include -using namespace std; - -#include "systemc.h" -#include "cicDecimator.h" - -int sc_main(int argc, char* argv[]) -{ - sc_clock CLK("CLK", 10, SC_NS); - sc_signal CLR; - sc_signal cicIN; - sc_signal cicOUT; - - cicDecimator DUT("DUT"); - DUT.CLR(CLR); - DUT.CLK(CLK); - DUT.cicIN(cicIN); - DUT.cicOUT(cicOUT); - - sc_trace_file *fp; - fp = sc_create_vcd_trace_file("wave"); - fp -> set_time_unit(100, SC_PS); - - sc_trace(fp, CLR, "CLR"); - sc_trace(fp, CLK, "CLK"); - sc_trace(fp, cicIN, "cicIN"); - sc_trace(fp, cicOUT, "cicOUT"); - sc_trace(fp, DUT.handoff, "HandOff"); - sc_trace(fp, DUT.slowclock, "SlowClock"); - - for(int i = 0; i < N; i++) - { - char str[3]; - sprintf(str, "(%0d)",i); - sc_trace(fp, DUT.internalI[i],"I" + string(str)); - } - for(int i = 0; i < N; i++) - { - char str[3]; - sprintf(str, "(%0d)",i); - sc_trace(fp, DUT.internalC[i],"C" + string(str)); - } - - CLR = true; - cicIN = 0; - sc_start(73, SC_NS); - - CLR = false; - cicIN = 1; - sc_start(390, SC_NS); - - /*CLR = false; - cicIN = 2; - sc_start(10, SC_NS); - - CLR = false; - cicIN = 3; - sc_start(10, SC_NS); - - CLR = false; - cicIN = 4; - sc_start(10, SC_NS); */ - - sc_close_vcd_trace_file(fp); - - return 0; - -} Index: cic/trunk/oc_cic.pdf =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: cic/trunk/oc_cic.pdf =================================================================== --- cic/trunk/oc_cic.pdf (revision 2) +++ cic/trunk/oc_cic.pdf (nonexistent)
cic/trunk/oc_cic.pdf Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: cic/trunk/header/downsample.h =================================================================== --- cic/trunk/header/downsample.h (revision 2) +++ cic/trunk/header/downsample.h (nonexistent) @@ -1,86 +0,0 @@ -#define M 2 - -SC_MODULE(downsample) -{ - sc_in CLR; - sc_in CLK; - sc_in samplesIN; - sc_out sampleOUT; - sc_out SCLK; - - sc_signal reg[M]; - - int count, scount; - - SC_CTOR(downsample) - { - SC_METHOD(lifo); - sensitive << CLK.pos(); - - SC_METHOD(output); - sensitive << SCLK.pos(); - - SC_METHOD(slowclock); - sensitive << CLK.neg(); - } - - void lifo() - { - if (CLR.read() == true) - { - count = 0; - } - else - { - if (CLK.posedge()) - { - for (int i = 0; i < M; i++) - { - if (i == 0) - { - reg[i].write( samplesIN.read() ); - } - else - { - reg[i].write( reg[i-1] ); - - } - } - } - } - } - - void slowclock() - { - if (CLR.read() == true) - { - scount = 0; - } - else - { - if (CLK.negedge()) - { - if (scount < M/2) - { - SCLK.write(1); - scount++; - } - else if (scount < M-1) - { - SCLK.write(0); - scount++; - } - else - { - SCLK.write(0); - scount = 0; - } - } - } - } - - void output() - { - sampleOUT.write(reg[0].read()); - } -}; Index: cic/trunk/header/integrator.h =================================================================== --- cic/trunk/header/integrator.h (revision 2) +++ cic/trunk/header/integrator.h (nonexistent) @@ -1,78 +0,0 @@ -/* - * This is a behavioral description for an integrator stage. - * The integrator consists of adder and single delay element. - * It should be noted that the output is asynchronous, i.e., - * as soon as the input changes the output has to change - * instantaneously. - */ - -SC_MODULE(integrator) -{ - /// Design entity - sc_in CLR; // Asynchronous active high reset - sc_in CLK; // Rising edge clock - sc_in integratorIN; // Integrator stage input - sc_out integratorOUT; // Integrator stage output - - /// Internal signals - sc_signal r_delay; // Internal signal used for delay - - /// Constructor - SC_CTOR(integrator) - { - SC_METHOD(algorithm); - sensitive << integratorIN << r_delay; - - SC_METHOD(delay); - sensitive << CLK.pos(); - - integratorOUT.initialize(0); - } - - /// Concurrent processes - /* - * This process emulates an adder stage. It adds the input - * and the a delayed version of the output, i.e., the prvious - * output sample. - */ - void algorithm() - { - if (CLR.read() == true) - { - - } - else - { - integratorOUT.write( integratorIN.read() + r_delay.read() ); - } - } - - /* - * This process emulates the recursive feedback from the - * output to the input through a delay path. - */ - void delay() - { - if (CLR.read() == true) - { - r_delay.write(0); - } - else - { - r_delay.write(integratorOUT.read()); - } - } -}; - - -/* Integrator Stage - - *** - --->* + *---------------> - *** | - ^ | - | ***** | - ----* z *<----- - ***** - -*/ Index: cic/trunk/header/cic.h =================================================================== --- cic/trunk/header/cic.h (revision 2) +++ cic/trunk/header/cic.h (nonexistent) @@ -1,70 +0,0 @@ -#include "integrator.h" -#include "comb.h" - -#define N 3 - -SC_MODULE(cic) -{ - sc_in CLR; - sc_in CLK; - sc_in cicIN; - sc_out cicOUT; - - integrator *I[N]; - comb *C[N]; - - sc_signal internalI[N]; - sc_signal internalC[N]; - - SC_CTOR(cic) - { - SC_METHOD(output); - sensitive << internalC[N-1]; - - for (unsigned j = 0; j < N; j++) - { - I[j] = new integrator(sc_gen_unique_name("I")); - if (j == 0) - { - I[j] -> CLR (CLR); - I[j] -> CLK (CLK); - I[j] -> integratorIN (cicIN); - I[j] -> integratorOUT (internalI[j]); - } - else - { - I[j] -> CLR (CLR); - I[j] -> CLK (CLK); - I[j] -> integratorIN (internalI[j-1]); - I[j] -> integratorOUT (internalI[j]); - } - } - - for (unsigned i = 0; i < N; i++) - { - C[i] = new comb(sc_gen_unique_name("C")); - if (i == 0) - { - C[i] -> CLR (CLR); - C[i] -> CLK (CLK); - C[i] -> combIN (internalI[N-1]); - C[i] -> combOUT (internalC[i]); - } - else - { - C[i] -> CLR (CLR); - C[i] -> CLK (CLK); - C[i] -> combIN (internalC[i-1]); - C[i] -> combOUT (internalC[i]); - } - } - - cicOUT.initialize(0); - } - - void output() - { - cicOUT.write(internalC[N-1]); - } - -}; Index: cic/trunk/header/comb.h =================================================================== --- cic/trunk/header/comb.h (revision 2) +++ cic/trunk/header/comb.h (nonexistent) @@ -1,67 +0,0 @@ -SC_MODULE(comb) -{ - /// Design entity - sc_in CLR; // Asynchronous active high reset - sc_in CLK; // Rising edge clock - sc_in combIN; // Comb stage input - sc_out combOUT; // Comb stage output - - /// Internal signals - sc_signal r, r_delay; // Internal signal used for delay - - /// Constructor - SC_CTOR(comb) - { - SC_METHOD(algorithm); - sensitive << combIN ;//<< r_delay; - - SC_METHOD(delay); - sensitive << CLK.pos(); - - combOUT.initialize(0); - } - - /// Concurrent processes - void algorithm() - { - if (CLR.read() == true) - { - r.write(0); - } - else - { - r.write(combIN.read()); - combOUT.write( combIN.read() - r_delay.read() ); - } - } - - /* - * This process emulates the non-recursive feedback from the - * input to the output through a delay path. - */ - void delay() - { - if (CLR.read() == true) - { - r_delay.write(0); - } - else - { - r_delay.write(r.read()); - } - } - -}; - - -/* Comb Stage - - *** - ------------------>* - *---> - | *** - | ^ - | ***** | - --->* z *------ - ***** - -*/ Index: cic/trunk/header/cicDecimator.h =================================================================== --- cic/trunk/header/cicDecimator.h (revision 2) +++ cic/trunk/header/cicDecimator.h (nonexistent) @@ -1,81 +0,0 @@ -#include "integrator.h" -#include "comb.h" -#include "downsample.h" - -#define N 3 - -SC_MODULE(cicDecimator) -{ - sc_in CLR; - sc_in CLK; - sc_in cicIN; - sc_out cicOUT; - - integrator *I[N]; - comb *C[N]; - downsample *D; - - sc_signal internalI[N]; - sc_signal internalC[N]; - sc_signal slowclock; - sc_signal handoff; - - SC_CTOR(cicDecimator) - { - SC_METHOD(output); - sensitive << internalC[N-1]; - - for (unsigned j = 0; j < N; j++) - { - I[j] = new integrator(sc_gen_unique_name("I")); - if (j == 0) - { - I[j] -> CLR (CLR); - I[j] -> CLK (CLK); - I[j] -> integratorIN (cicIN); - I[j] -> integratorOUT (internalI[j]); - } - else - { - I[j] -> CLR (CLR); - I[j] -> CLK (CLK); - I[j] -> integratorIN (internalI[j-1]); - I[j] -> integratorOUT (internalI[j]); - } - } - - D = new downsample("D"); - D -> CLR (CLR); - D -> CLK (CLK); - D -> samplesIN (internalI[N-1]); - D -> sampleOUT (handoff); - D -> SCLK (slowclock); - - for (unsigned i = 0; i < N; i++) - { - C[i] = new comb(sc_gen_unique_name("C")); - if (i == 0) - { - C[i] -> CLR (CLR); - C[i] -> CLK (slowclock); - C[i] -> combIN (handoff); - C[i] -> combOUT (internalC[i]); - } - else - { - C[i] -> CLR (CLR); - C[i] -> CLK (CLK); - C[i] -> combIN (internalC[i-1]); - C[i] -> combOUT (internalC[i]); - } - } - - cicOUT.initialize(0); - } - - void output() - { - cicOUT.write(internalC[N-1]); - } - -};

powered by: WebSVN 2.1.0

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