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

Subversion Repositories simple_customized_counter

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 42 to Rev 43
    Reverse comparison

Rev 42 → Rev 43

/simple_customized_counter/trunk/CounterLib.psC
13,30 → 13,38
// ALU (Arithmetic and Logic Unit) or a calculator.
//
// The output always generates an event.
// If you don't want the event, remove the colon ':' in the value assignment
// If you don't want the event, remove the colon ':' in the value assignment.
// Ex: change oValue := 0; to oValue = 0;
//
// ===================================================================
// There are four counters in the library:
// - CCounterEvent: executes the operation on input events
// - CCounterLevel: executes the operation at each step
// - CCounterOprEvent: executes the operation on input event using iOpr
// - CCounterOprLevel: executes the operation at each step using iOpr
// There are four counters in the library.
//
// The first two executes the operation on input events:
// - CCounterEvent: operations depends on inputs: iReset, iUp, iDown, iLoad
// - CCounterOprEvent: operations depends on a single input: iOpr
//
// The last two executes the operation at each step i.e. FPGA clock:
// - CCounterLevel: operations depends on inputs: iReset, iUp, iDown, iLoad
// - CCounterOprLevel: operations depends on a single input: iOpr
//
// ===================================================================
// TEST BENCHES:
//
// - CCounterEvent: Manual test with control panel
// Project in "TestCounterEvent" folder
// - CCounterLevel: Using waveform editor and viewer
// Project in "TestCounterLevel" folder
// - CCounterOprLevel: Using waveform editor and viewer
// Project in "TestCounterOprLevel" folder
// - CCounterOprEvent: > Smulated DE1SoC board, you only need the BSP
// > Real DE1SoC board, you need the real board
//
// - CCounterOprEvent: Simulated DE1SoC board, you need the BSP
// Real DE1SoC board, you need the real board
// Project in "TestCounterOprEventBoard" folder
// > Controlled by a C++ program
// Performed by a C++ program
// Project in "TestCounterOprEventAPI" folder
// << This project requires a paid license >>
//
// - CCounterLevel: Using signal editor and viewer
// Project in "TestCounterLevel" folder
//
// - CCounterOprLevel: Using signal editor and viewer
// Project in "TestCounterOprLevel" folder
// ===================================================================
 
library CounterLib
76,7 → 84,7
};
// -------------------------------------------------------------------
// This counter executes the operation at each step or clock cycle
// This counter executes the operation at each step or FPGA clock cycle
// The priority is implemented with if and else instructions
// -------------------------------------------------------------------
component CCounterLevel (in passive bit iReset,
116,9 → 124,9
enum Opr_t { cOprNone, cOprReset, cOprUp, cOprDown, cOprLoad };
 
// -------------------------------------------------------------------
// This counter executes the operation at each step or clock cycle
// The input iOpr has the type Opr_t and determines the operation
// There is no priority on the operations
// This counter executes the operation on input events.
// The input iOpr has the type Opr_t and determines the operation.
// There is no priority on the operation.
// -------------------------------------------------------------------
// The switch statement has no break, only one case is executed
// -------------------------------------------------------------------
140,7 → 148,7
};
// -------------------------------------------------------------------
// This counter executes the operation at each step or clock cycle
// This counter executes the operation at each step or FPGA clock cycle
// The input iOpr has the type Opr_t and determines the operation
// There is no priority on the operations
// -------------------------------------------------------------------

powered by: WebSVN 2.1.0

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