画时序图是做文档,写笔记里面非常常用的,无奈一直没找到好的画时序图的软件.不过最近发现VSC里面居然有这个插件.
复制上面的示例,然后可以按Ctrl+Shift+P进行绘图,还可以实时更新时序图,非常好看.
测试代码:
{
signal:
[
{ name: "clk", wave: "p.....|..." },
{
name: "Data",
wave: "x.345x|=.x",
data: ["head", "body", "tail", "data"],
},
{ name: "Request", wave: "0.1..0|1.0" },
{},
{ name: "Acknowledge", wave: "1.....|01." },
],
}
渲染效果
语法这里都有.
https://github.com/wavedrom/schema/blob/master/WaveJSON.md
整体来说非常方便