Closed4
wavedrom-llmをためす

要件を入力として、LLM(Gemini)に WavedromのJSON形式で出力させようというもの

デフォルトページ
https://wavedrom.com/tutorial.html の Step 2. Adding Clock から、"Digital clock is a special type of signal. It changes twice per time period and can have positive or negative polarity. It also can have an optional marker on the working edge. The clock's blocks can be mixed with other signal states to create the clock gating effects. " を貼り付け。
クロックは出た。APIの利用料はデモページ側で負担してくれている?

System Prompt
System Promptの条件での各timing diagramの構成要素と最初の指示(下記の Input)を、再度入力したときの結果。出力はSystemPromptを再現しているだけか、LLMが推論しているのかはわからない。LLMを呼んでいる印象ではある。
Inputs:
Generate an I2C read packet with one byte
Outputs:
{"signal": [{"name": "SCL", "wave": "1.0p|.....|..1.", "phase": 0.5}, {"name": "SDA", "wave": "103.|304..|0.1", "data": ["Addr[6:0]", "R=1", "data0[7:0]"]}]}
System Promptに含まれている例の、 "A XXX timing diagram includes two waveforms:.." を改めてあたえなくても、出力されるよう。別の回路を設定する場合は、いったんクリアするように指示する必要があるかもしれない。

ほかによい例があればやるのだが、そこまでの知識がない。。
このスクラップは2025/02/08にクローズされました