Make it easier to understand the project
Be inspired by the ISSCC paper, and design a similar system.
Design analog circuits in SPICE
Design digital circuits in SystemVerilog
image ../ip/idea.png removed photon sensor ⇒ local analog to digital converter ⇒ local memory
image ../ip/block_diagram_modified.pdf removed
image ../ip/sensor.png removed ## SENSOR
image ../ip/comparator.png removed
image ../ip/memory.png removed ## MEMORY
Decimal | Binary | Gray |
---|---|---|
0 | 000 | 000 |
1 | 001 | 001 |
2 | 010 | 011 |
3 | 011 | 010 |
4 | 100 | 110 |
5 | 101 | 111 |
6 | 110 | 101 |
7 | 111 | 100 |
dicex/sim/verilog/graycounter.v
module graycounter(out, clk, reset);
parameter WIDTH = 8;
output [WIDTH-1 : 0] out;
input clk, reset;
logic [WIDTH-1 : 0] out;
wire clk, reset;
logic [WIDTH-1 : 0] q;
always @(posedge clk or posedge reset) begin
if (reset)
q <= 0;
else begin
q <= q + 1;
end
out <= {q[WIDTH-1], q[WIDTH-1:1] ^ q[WIDTH-2:0]};
end
endmodule // graycounter
aimspice, ngspice, spectre, eldo, hspice
Time evolution (transient analysis) is a numerical analysis to differential equations for voltage and current. For example Newton’s method
For more info, see In a Nutshell: How SPICE Works
Can simulate digital circuits, but very slowly
iverilog, questa, xcelium, vcs
Time evolution with time steps, and delta-time
Cannot simulate analog differential equations!
Control time in both analog and digital simulator
Provide analog-to-digital and digital-to-analog converters to “mirror” signals in the other simulator
Not sure there is an open source mixed-signal simulator
project/
├── spice/
│ ├── Makefile # See https://www.gnu.org/software/make/manual/html_node/Introduction.html
│ ├── pixelSensor.cir # Almost empty circuit for pixelSensor
│ └── pixelSensor_tb.cir # SPICE testbench for pixelSensor, emulates verilog
└── verilog/
├── Makefile
├── pixelSensor.fl # Verilog file list
├── pixelSensor_tb.gtkw # Save file for GTKWave
├── pixelSensor_tb.v # Verilog testbench for pixelSensor
└── pixelSensor.v # Verilog model of analog pixelSensor circuit
Make a SystemVerilg module (i.e pixelArray.v
), that use
pixelSensor.v
Figure out which signals need to be a bus, and what signals are common for the pixels
Make a testbench pixelArray_tb.v
to check that the
pixelArray.v
compiles and do some rudementary tests to
check that you’ve hooked things up correctly
## State machine |
Make a SystemVerilog module pixelState.v that can
connect to pixelArray.v |
Make a state machine to control reset, exposure, analog-to-digital conversion, and readout of the pixel array |
Make a testbench pixelState_tb.v to test the state
machine |
Make a SystemVerilog module pixelTop.v
that connects
pixelState.v
to pixelArray.v
Make a testbench pixelTop_tb.v
to test the statemachine
and readout of the 2 x 2 array
## SPICE of pixel sensor |
Copy pixelSensor.cir to another name |
Copy pixelSensor_tb.cir to another name |
Make the design from the paper (Fig. 4) - Sensor (SENSOR) - Comparator (COMP) - Memory (MEMORY) |
Add something (like Rphoto in
pixelSensor.tb ) to model the photocurrent. |
Add a testbench for each subcircuit (COMP, SENSOR, MEMCELL, MEMORY) |
Week | Plan |
---|---|
34 | Register group |
35 | Read and understand paper |
36 | Sketch what you want to do |
37 | Write theory chapter in report |
38 | Design & simulation |
39 | Design & simulation |
40 | Design & simulation |
41 | Design & simulation |
42 | Verification |
43 | Verification |
44 | Write report |
45 | Write report |
46 | Deadline |
project/
├── spice/
│ ├── Makefile # See https://www.gnu.org/software/make/manual/html_node/Introduction.html
│ ├── pixelSensor.cir # Almost empty circuit for pixelSensor
│ └── pixelSensor_tb.cir # SPICE testbench for pixelSensor, emulates verilog
└── verilog/
├── Makefile
├── pixelSensor.fl # Verilog file list
├── pixelSensor_tb.gtkw # Save file for GTKWave
├── pixelSensor_tb.v # Verilog testbench for pixelSensor
└── pixelSensor.v # Verilog model of analog pixelSensor circuit
Let’s check what’s inside the files