B-Lang-org/bsc

Generate appropriate empty argument lists for Verilog system tasks/functions

開放

#304 建立於 2021年2月3日

 (0 則留言) (0 個反應) (0 位負責人)Haskell (178 個分叉)batch import
good first issuepre-github

倉庫指標

星標
 (1,108 顆星)
PR 合併指標
 (平均合併 17天 1小時) (30 天內合併 18 個 PR)

描述

When system tasks appear in the generated Verilog, this code in Verilog.hs omits the parenthesis when there are no arguments:

-- no parens when calling a task if it has no arguments                                                                                   
pPrint d p (VTask task []) = pPrint d 0 task <> text ";"

This was probably added because that is how the Verilog standard says that $finish should be written. However, for $fflush, the standard says that it must have empty parentheses, and some tools will be sticklers and issue a warning if the parentheses are missing.

The pPrint code will probably need to check the task name, to handle each specifically.

This is bug 1925 in Bluespec Inc's pre-GitHub bug database.

貢獻者指南