tile: BaseTile refactor, pt 1
* Make dts generation reusable across tile subclasses * First attempt to standardize tile IO nodes and connect methods * hartid => hartId when talking about scala Ints
This commit is contained in:
		| @@ -31,6 +31,25 @@ package object diplomacy | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   type PropertyOption = Option[(String, Seq[ResourceValue])] | ||||
|   type PropertyMap = Iterable[(String, Seq[ResourceValue])] | ||||
|  | ||||
|   implicit class IntToProperty(x: Int) { | ||||
|     def asProperty: Seq[ResourceValue] = Seq(ResourceInt(BigInt(x))) | ||||
|   } | ||||
|  | ||||
|   implicit class BigIntToProperty(x: BigInt) { | ||||
|     def asProperty: Seq[ResourceValue] = Seq(ResourceInt(x)) | ||||
|   } | ||||
|  | ||||
|   implicit class StringToProperty(x: String) { | ||||
|     def asProperty: Seq[ResourceValue] = Seq(ResourceString(x)) | ||||
|   } | ||||
|  | ||||
|   implicit class DeviceToPeroperty(x: Device) { | ||||
|     def asProperty: Seq[ResourceValue] = Seq(ResourceReference(x.label)) | ||||
|   } | ||||
|  | ||||
|   def EnableMonitors[T](body: Parameters => T)(implicit p: Parameters) = body(p.alterPartial { | ||||
|     case MonitorsEnabled => true | ||||
|   }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user