MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
587 stars 130 forks source link

error in JSON generated for DPI-C declaration #376

Closed jankcorn closed 3 years ago

jankcorn commented 3 years ago

The following verilog: module VsimTop ( input wire CLK, input wire nRST); import "DPI-C" function void dpi_msgSend_enq(input int enq); always @(posedge CLK) begin dpi_msgSend_enq(32'h0); end endmodule Produces a json fragment: { "name": "dpi_msgSend_enq", "kind": "Subroutine", ... "arguments": [ "lifetime": "Automatic", "isConstant": false, "isCompilerGenerated": false, "direction": "In" ] } which fails to parse using the cJSON library.

The interior of the array for "arguments", must be 'elements', not 'members': https://www.crockford.com/mckeeman.html (you need to put '{'/'}' around the members)

MikePopoloski commented 3 years ago

Fixed in 407a4fad07

jankcorn commented 3 years ago

So fast! Thanks very much

On 12/30/20, Michael Popoloski notifications@github.com wrote:

Closed #376.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/MikePopoloski/slang/issues/376#event-4158655328