HTTP server (Zynq-7000) · Networking
Accept one HTTP request through a W5500 and return a fixed response. The Cora configures the chip over SPI, and the host peer checks the reply on the wire.
Scores
Prompt
Implement a simple HTTP server using the W5500. It should accept requests at the configured path and return the configured response.
Specifics
- Local MAC address: 02:46:57:00:00:02
- Local IPv4 address: 10.55.0.2
- Port: 40011
- Subnet mask: 255.255.255.0
- Gateway IPv4 address: 10.55.0.1
- Request path: /fieldwork
- Response content type: text/plain
- ASCII response body: fieldwork
- Return a
200 OKresponse with the configured content type and body. - Use CRLF line endings and close the connection after responding.
Hardware layout
- W5500 SCSn pin: CK_SS
- W5500 SCLK pin: CK_SCK
- W5500 MOSI pin: CK_MOSI
- W5500 MISO pin: CK_MISO
- W5500 INTn pin: CK_IO6
- W5500 RSTn pin: CK_IO7
References
W5500.pdfCora-Z7-07S-Master.xdc
Build
Target: Cora Z7: Zynq-7000 Single Core — Vivado SystemVerilog (SystemVerilog).
Include your XDC file, pass it to the contraints field of the build JSON.
There is a SanDisk 32 GB SD card in the slot.
Provide the build parameters by writing a fieldwork-build.json file with the following schema:
{
"type": "object",
"properties": {
"sources": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
"top": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_$]*$"
},
"constraints": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
}
},
"required": [
"sources",
"top",
"constraints"
],
"additionalProperties": false
}Leave the current directory as a complete, self-contained project. Include every source file and build input it requires, and use project-relative paths. The project must build from source without depending on files or build outputs outside this directory.
Use the available tools in your environment. Submit a complete solution.
Rubrik & Analysis of Selected Trajectory
Claude Opus 5.5 · High · Claude Code
- Runtime
- 13m 53s
- Cost
- $2.07
- Output tokens
- 53.6k
Platform Section15% of overall score
| Check | Pass / Fail | Weight within section |
|---|---|---|
| buildsThe design synthesized and the bitstream built. | PASS | 22.2% |
| flashesThe image programmed onto the Cora. | PASS | 11.1% |
| timing constraintsPost-route timing closed. Setup WNS was 1.375 ns and hold WNS was 0.052 ns. | PASS | 66.7% |
Runtime Section · HTTP85% of overall score
| Check | Pass / Fail | Weight within section |
|---|---|---|
| connectedThe host peer opened no TCP connections. | FAIL | 14.3% |
| listen endpointNothing accepted a connection on 10.55.0.2:40011. | FAIL | 14.3% |
| exact responseThere was no response to compare with the expected 200 OK. | FAIL | 28.6% |
| response accuracyNo response bytes arrived. | FAIL | 14.3% |
| closedNo connection opened, so none closed. | FAIL | 14.3% |
| single connectionThe host peer opened no TCP connections. | FAIL | 14.3% |
Analysis
This task is the hello world of networking. The instruction is simply to accept an HTTP get request and return some fixed response. One motivating use-case of FPGA networking is in high-frequency trading. Their systems are more advanced than this setup, which makes it clear that these simpler tasks need to be nailed.
To send ethernet signal, we equip our test device with a W5500 networking module. Our test device in this instance is Cora Z7 SoC (System on a Chip, or FPGA + processor combo). The Cora is expected to configure the W5500 as needed and use it to read in requests and send out responses.
On average, Opus ran for 17 minutes 45 seconds, spent 53k tokens, and scored a 27%. Here is a trajectory we found representative of the group.
| Time | Trajectory Activity |
|---|---|
| 0:00–2:30 | Checking out the workspace, the references, and available software in the environment. |
| 2:30–4:50 | Wrote the main code. The code begins with a version check of the W5500 device (basically a health check). We like this idea. The rest of the code appears standard. |
| 4:50–6:55 | Wrote a simulation for the W5500 and a test bench (good idea). Found some small bugs, fixed them. |
| 6:55–12:00 | Ran a full build to make sure the code could actually be synthesized and executed on the device. |
| 12:00–13:50 | Last cleanup of unused variables, re-ran sim, and submitted. |
So, what went wrong? It turns out that this W5500 has an electrical nuance where the data it produces is not quite ready exactly on the rising edge of the clock. The simulated environment idealized the W5500’s behavior, and hence the tests passed on paper. In practice this design caused us to never even get past the health check.
Something like this could have been prevented without even the lab-level monitoring equipment we used to detect what went wrong. A particularly strong Fable 5.2 run actually decided to account for this same possible issue by delaying the read of the data just a little bit from the clock edges. This is the behavior we want to reinforce.