99 Until heat death do us part

99 : Until heat death do us part

Design render
  • Author: Julia Desmazes
  • Description: Counting until the heat death of the universe, broadcasting counter value every second over ethernet.
  • GitHub repository
  • Open in 3D viewer
  • Clock: 50000000 Hz

ASIC with a large enogth counter to theoretically counts until the heat death of the the universe. Counter value is incremented ever 20ns and every second it will broadcasts an ethernet frame over 100Mbps ethernet with the current counters value, not that anyone is going to be listening for long anyways.

Assuming the universe dies in approximatively $10^{100}$ years. If you are patient enogth to wait until then there is a hidden easter egg when we eventually overflow.

How it works

This project is re-using the Teapot Ethernet accelerator wrapper for communicating over 100Mbps Ethernet using a CAT-3/5 cable in full-duplex mode. Here is to hopeing someone still remeber how to talk Ethernet by then.

Ethernet packets

This wrapper workes with layer 2 ethernet packets, opperating at the level of the ethernet frame. It support two types of packets:

  • application packets, ethtype = 0x88B5 sent by the accelerator
  • configuration packets, ethtype = 0x88B6 used to set the ASICs MAC address, Vlan IDentifier, and the TX phase selection

All packets whos destination MAC do not match the ASIC's current MAC address will be filtered out. Unless otherwise specified the ASIC's MAC address is 00:90:CF:00:BE:EF (read as Nortel:BEEF).

Application packets

The end of the universe counter does not listen to any incomming packets (we are all going to be dead soon anyways) and broadcasts the current counter value every second.

Response

[ dst mac (6 Bytes) FF:FF:FF:FF:FF:FF ][ src mac (6 Bytes) ][ ethtype = 0x88B5 (2 Bytes) ][ magic number = 0xCAFE (2 Bytes) ][ counter (48 Bytes) ][ FCS (4 Bytes) ] 
0

Counter values are sent in little endian with a granule size of 1 byte (standard).

Configuration packets

Configuration packets are used to set the ASIC's current:

  • MAC address
  • Vlan ID
  • TX data to clock phase offset

These packets are not forwarded to the accelerator, do not provide any acknoledgement and due to our area limitation are not store and forwarded. Any corrupted packets will result in a corrupted configuration.

Packet:

[ dst mac (6 Bytes) ][ src mac (6 Bytes) ][ ethtype = 0x88B6 (2 Bytes) ][ New MAC (6 Bytes) ][ padding (3 bits)][ VID (12 bits)][ padding (38 Bytes) ][ FCS (4 Bytes) ]
0

Unless otherwise configured application packets use ethertype 0x88B6, the second IEEE 802.3 specified "Local Experimental Ethertype", whos existence linux networking libraries are unaware of. So trust me: it's real.

Configuration parameters
MAC address

ASIC's current MAC address, all packets not addressed (dst mac) to this address will be filtered out, and all responses will use this as the source address.

Default MAC: 00:90:CF:00:BE:EF (read as Nortel:BEEF)

Configuration pins: TX data to reference clock phase offset

To comphensate for the output data to reference clock offset induced by the delay on the path from the clock input pin, to the tiny tapeout design's data out flip-flop and back to the output pin, the reference clock for the data out flip flop is selectable, allowing us to use a 180 degree dephased reference clock.

This dephasing configuration is captured during reset depending on the state of the tx_phase pin.

Values:

  • 0 no phase shift
  • 1 180 degree phase shift

How to test

Connect the ethernet 100Mbps capable connector to the asic, if the connector doesn't expose a rx_err signal clamp it to gnd. Cable the ethernet connector to your local network, it doesn't have to be directly to your computer so long your are in the same local network (layer2 packets can be routed within it).

The ASIC will autonomously send an application packet (ethtype:0x88b5) every 1s.

Network sniffing tool

Build the packet sender/receiver app in tools:

cd tools
make

To run pass the name of your ethernet interface currently connected to the same LAN as the ASIC. Eg: I am connected though my wifi interface:

sudo ./packet_receiver wlp3s0

Example of the expected output:

[pitchu](master) ~/asic/heat_death/tools >sudo ./packet_receiver wlp3s0
ethernet interface: wlp3s0
wlp3s0 mac address 60:e9:aa:92:dc:7d
asic mac address 00:90:cf:00:be:ef
dst mac ff:ff:ff:ff:ff:ff
src mac 00:90:cf:00:be:ef
ethtype 88b5
counter: 70282575969
counter debug: 0x000000005d2b0061
raw pkt: ffffffffffff0090cf00beef88b5feca61002b5d1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

dst mac ff:ff:ff:ff:ff:ff
src mac 00:90:cf:00:be:ef
ethtype 88b5
counter: 70332579937
counter debug: 0x0000000060260061
raw pkt: ffffffffffff0090cf00beef88b5feca610026601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

dst mac ff:ff:ff:ff:ff:ff
src mac 00:90:cf:00:be:ef
ethtype 88b5
counter: 70382583905
counter debug: 0x0000000063210061
raw pkt: ffffffffffff0090cf00beef88b5feca610021631000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

dst mac ff:ff:ff:ff:ff:ff
src mac 00:90:cf:00:be:ef
ethtype 88b5
counter: 70432522337
counter debug: 0x00000000661b0061
raw pkt: ffffffffffff0090cf00beef88b5feca61001b661000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

In case of issues

You can also observe the packets being sent back by sniffing your live traffic via tcpdump:

sudo tcpdump -xx -e -v 'ether proto 0x88b5'

In case issues perciste

In case you still see no traffic.

Directly connect the ethernet cable to your computer and check the ethernet interface exposed low level counters to see if you are seeing traffic on your line.

eg:

sudo ethtool -S enp2s0

External hardware

Ethernet 100BASE-T Pmod connector, featuring:

  • LAN8720A PHY
  • 50MHz oscillator

Amazone version of the external pmod connector.

IO

#InputOutputBidirectional
0phy_rx_data[0]phy_tx_data[0]
1phy_rx_data[1]phy_tx_data[1]
2phy_rx_vphy_tx_v
3phy_rx_err
4
5
6
7tx_phase

Chip location

Controller Mux Mux Mux Mux Mux Analog Mux Analog Mux Mux Mux Mux Analog Mux Mux Mux Analog Mux Mux Mux Mux tt_um_chip_rom (Chip ROM) tt_um_factory_test (Tiny Tapeout Factory Test) tt_um_tnt_gf_555 (tnt's recreation of a 555 on GF180mcu) tt_um_mcml_vco (MCML VCO) tt_um_tnt_gf_vco (Quadrature VCO) tt_um_oscillating_bones (Oscillating Bones) tt_um_MichaelBell_tinyQV (TinyQV Risc-V SoC) tt_um_essen (256x8 SRAM) tt_um_analog_factory_test (TT GF180mcuD Analog Factory Test) tt_um_cw_testbuffer (TT GF180mcuD Testbuffer) tt_um_fabulous_gf_0p3 (Tiny FABulous FPGA) tt_um_fabulous_gf_0p3_3v3 (Tiny FABulous FPGA (3.3V version)) tt_um_htfab_momcap (MoM capacitor) tt_um_gf_r2r_dac (GF R2R DAC) tt_um_AbAdA_2048 (Abad2048) tt_um_mattvenn_signal_generator (Simple Signal Generator) tt_um_74hct00 (74HCT00 Quad 2-Input NAND (3.3 V)) tt_um_algofoogle_gf_analog (algofoogle analog stuff) tt_um_LPCAS_TTGF0P3_TP1 (3.3V Folded Cascode OTA ) tt_um_kianV_rv32ima_uLinux_SoC (KianV uLinux SoC) tt_um_kiterai_current_dac (Analog 4 bit Current DAC) tt_um_urish_simon (Simon Says memory game) tt_um_waferspace_vga_screensaver (Wafer.space Logo VGA Screensaver) tt_um_urish_usb_cdc (USB CDC (Serial) Device) tt_um_a1k0n_nyancat (VGA Nyan Cat) tt_um_rahulbhagwat_gf180_bandgap_reference (GF BGR) tt_um_odgrip_polywave (PolyWave) tt_um_2048_vga_game (2048 sliding tile puzzle game (VGA)) tt_um_combined (Philippine flag waving) tt_um_gojimmypi_ttgfa_UART_FSM_TRNG_Lab (Hardware Entropy Explorer: UART/SPI TRNG and PUF) tt_um_gojimmypi_ttgfa_UART_FSM_TRNG_Lab_analog (Hardware Entropy Explorer: UART/SPI TRNG and PUF (Analog)) tt_um_coldbrew (Until heat death do us part) Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available Available